Skip to content
Devkito

SQL Prettify

Format and prettify SQL queries.

Runs on your machine. Nothing you paste is uploaded.

Download freePricing

Get SQL Prettify and 121 other tools. Free for 7 days, no account needed.

SQL Prettify in Devkito

What it does

Paste a SQL query, often a long single line copied from logs or an ORM, and get it back formatted with one clause per line, indented joins and conditions, and uppercase keywords. The output sits next to the input with SQL highlighting, ready to copy.

Choose the dialect that matches your database: standard SQL, MySQL, MariaDB, PostgreSQL, SQLite, SQL Server (T-SQL), Oracle PL/SQL or BigQuery. A real tokenizer is used, so string literals, quoted identifiers and comments are left untouched. If the query cannot be parsed for the chosen dialect, the error is shown.

When you would reach for it

  • Read a query captured from an ORM's debug log or a slow query log.
  • Format SQL before pasting it into a pull request, a migration or documentation.
  • Make a long report query with several joins easier to review.
  • Normalize keyword casing across queries written by different people.

Also found by searching