Why format SQL
Formatted SQL makes joins, conditions and subqueries easy to review and diff. Formatting is done by the open-source sql-formatter library (MIT licence); the query is never run or sent anywhere.
Related tools
Frequently asked questions
Does it run my query?
No – it only reformats text.
Which databases are supported?
Standard SQL, MySQL, MariaDB, PostgreSQL, SQL Server, SQLite, Oracle PL/SQL, BigQuery, Snowflake, Redshift and Spark SQL.
Why choose a dialect?
Dialects have different keywords, quoting and operators.
Can it fix SQL errors?
No – it formats valid-looking SQL and reports what it cannot parse.
Are comments kept?
Yes.
Can I format several statements?
Yes – they are separated by a blank line.
Does it change identifiers?
No – only keyword case and whitespace.
Can I minify SQL?
Use the SQL Minifier.
Is it safe for production queries?
Yes – nothing leaves your browser.
Does it support stored procedures?
PL/SQL and T-SQL procedures are supported.
What about parameters like ? or :id?
Placeholders are kept.
Can I choose tabs?
Spaces only.
Which library is used?
sql-formatter 15 (MIT licence).
Why is my query not formatted?
An unsupported construct for the chosen dialect – try Standard SQL.
Is my code uploaded?
No – it is processed in your browser and never leaves your device.
Is it free?
Yes, with no sign-up or limits.
Can I open a file?
Yes – use “Open file”, or paste the code.
Does it work offline?
Once the page and its library have loaded, yes.
Can I copy or download the result?
Copy it with one click, or download where offered.
Does it work on a phone?
Yes, though large files are easier on a computer.
Last reviewed: 8 November 2026.