Clause-aware indenting
SELECT columns, FROM tables, JOIN/ON pairs, WHERE conditions, GROUP BY and ORDER BY each break onto aligned lines for instant readability.
Beautify · Indent · Minify · Uppercase keywords · No upload
Paste a cramped or one-line SQL query and get it back cleanly indented: every clause on its own line, JOINs and conditions aligned, keywords cased the way you like. Switch to minify to collapse a query to a single line, choose 2-space, 4-space or tab indentation, pick uppercase or lowercase keywords, and set trailing or leading commas. Works with MySQL, PostgreSQL, SQL Server and standard SQL — everything runs in your browser, nothing is uploaded.
SELECT columns, FROM tables, JOIN/ON pairs, WHERE conditions, GROUP BY and ORDER BY each break onto aligned lines for instant readability.
Force keywords to UPPERCASE, lowercase or Capitalized in one click while your identifiers keep the case you typed.
Collapse a multi-line query into a single compact statement for logs, scripts and config strings without breaking strings or comments.
Queries are parsed locally in JavaScript. Nothing is uploaded, so schema names and data stay on your machine, even offline.
Paste the query and keep the Format tab selected. The tool tokenises the SQL and rebuilds it with each clause on its own line and nested sub-queries indented, so a wall of text becomes a structured statement you can read top to bottom.
Yes. The Keywords option only touches reserved words such as select, from, join, where and data types. Your table and column names are never recased, so userId stays userId.
It does. The tokeniser understands backtick identifiers (MySQL), double-quoted identifiers and :: casts (PostgreSQL), and bracket identifiers (SQL Server / T-SQL), plus standard ANSI SQL, so queries from any of these format cleanly.
With Leading commas enabled, each column after the first starts with a comma instead of ending with one. This style makes it easy to comment out or reorder columns and keeps diffs small in version control.
No. Formatting runs entirely in your browser with JavaScript. The query never leaves your device and the page keeps working with no network connection once loaded.