Tools / Developer
SQL Formatter
Turn one long line of SQL into a clean, readable query, or squeeze it back into one line. Works with every major database dialect.
Formatted
How to use it
- Paste your SQL or open a .sql file.
- Pick the dialect your database uses, then keyword case and indent.
- Copy or download the formatted query, or switch to Minified for one line.
Questions
Which databases does it support?
Standard SQL, MySQL, MariaDB, PostgreSQL, SQLite, BigQuery, SQL Server, Snowflake, Oracle PL/SQL, Redshift, Spark and Trino.
Is my query sent to a server?
No. Formatting runs in your browser, so table names and data in your queries stay private.
Does formatting change what the query does?
No. Only spaces, line breaks and optionally keyword case change. Strings and identifiers are kept exactly as written.