Paste a SQL query and get a cleanly indented, readable version instantly. Choose your SQL dialect to match the formatting conventions of your database.
Formatting runs entirely in your browser.
The tool uses the sql-formatter library, a dialect-aware SQL pretty-printer that runs entirely in your browser. It parses your query and re-emits it with consistent indentation and capitalisation. No server required.
All formatting happens locally in your browser tab. Our servers are not involved at any point.
For inspecting JSON returned by queries, try the JSON formatter. To validate identifier patterns in your SQL, use the regex tester. For converting query results into structured rows, see CSV to JSON.
SQL beautification (also called formatting or pretty-printing) reformats a SQL query with consistent indentation, line breaks, and keyword casing to make it easier to read and maintain.
Formatting only changes whitespace and capitalisation. It does not alter the logic, execution plan, or result of the query.
All processing runs in your browser using JavaScript. Our servers are not involved at any point.
Standard SQL, MySQL, PostgreSQL, and T-SQL (Microsoft SQL Server). Select the appropriate dialect to get formatting that matches your database's conventions.