Do
Format options
Keywords
Data types
Functions
Indent
Layout
Commas
AND / OR
  • 100% Free
  • No Sign-Up
  • No Credit Card
  • No Free Trial
  • No Pro Tier
  • No Watermarks

Nothing is uploaded. Just open it and start.

Format and minify SQL

Free, no sign-up, no credit card, no trial. Your query never leaves the browser — paste it to beautify with consistent indentation and keyword casing for your dialect, or minify it to a single clean line.

Beautify any query

Clean, consistent indentation and line breaks for even the gnarliest joins and subqueries.

Dialect-aware

Postgres, MySQL, SQLite, T-SQL, BigQuery and Oracle, with short errors that point at the line and suggest a dialect that fits.

Safe minify

Reads strings, comments and hints the way your dialect does, and keeps GO and DELIMITER scripts runnable.

Proof it's the same query

Every result is checked token by token against your query, with a side-by-side view of the changes.

SQL in code

Turn a query into a string for six languages, take one back out, fill in parameters or hide values.

Private & client-side

Your queries never leave the browser. No server round trip, ever.

Frequently asked questions

Which SQL dialects are supported?
Standard SQL plus PostgreSQL, MySQL, MariaDB, SQLite, SQL Server (T-SQL), BigQuery, and Oracle (PL/SQL). Pick your dialect so keywords, functions, and quoting are formatted the way that database expects.
What does the minifier do?
It collapses a query onto as few lines as possible: comments go (or stay, if you tick Keep comments) and runs of whitespace become single spaces. It reads the query the way your dialect does, so strings, quoted names, [bracketed] names, $$ function bodies, MySQL # comments, /*! */ code and optimizer hints are handled correctly, and T-SQL GO and MySQL DELIMITER lines keep a line of their own.
Can I control the keyword case and indentation?
Yes. Under Format options you can set the case of keywords, data types and functions, indent with 2 or 4 spaces or a tab, choose a standard or tabular layout, put commas and AND/OR at the start or end of lines, set the line width, the blank lines between statements and the spacing around operators. Your choices and your last query are remembered in this browser.
Will it change my query's meaning?
No, and the tool checks it every time: it compares the query before and after token by token and shows "Same query: only spacing changed" (or letter case, when you asked for it). Strings, quoted names and numbers must match exactly. "Show changes" opens both side by side in Code Compare.
Can I turn a query into a code string, or get it back out of code?
Yes. "To code" writes the formatted query as a JavaScript template literal, a Python triple-quoted string, a Java text block, a Go raw string, a C# verbatim string or a PHP nowdoc, escaped correctly. "Take SQL out of code" does the reverse: paste a snippet with the query in quotes, even split over several concatenated strings, and get clean SQL.
Can it fill in parameters or hide the values in a query?
Yes. When a query has placeholders (?, $1, :name), "Fill in parameters" gives you a box for each so you get a query you can run. "Hide values" replaces every string and number with ? so you can paste a query into a ticket without the data in it.
Is my SQL uploaded anywhere?
No. All formatting and minifying happen in your browser with JavaScript — nothing is uploaded, logged, or stored, which matters when a query contains schema or data details. It's free with no sign-up.

Spotted a bug or have a suggestion?

Found something broken, have an idea, or just want to say thanks about any of our tools? Every message reaches a real person.