SQL Formatter
Format SQL queries with uppercase keywords, one clause per line and clean indentation.
Input
Paste a SQL query above, or upload a .sql file.
Output
How to use SQL Formatter
- Paste your SQL or upload a file.
- Click Format SQL.
- Copy the result or download it.
Frequently asked questions
Which databases does it support?
It formats standard SQL, which covers everyday queries for MySQL, PostgreSQL, SQL Server, SQLite and Oracle. Very database-specific syntax may be laid out less neatly.
Does it change my query?
No. Keywords are written in capitals and the layout changes; table names, column names and values are untouched.
Does it check that my query is correct?
No. It formats the query but does not run it or check it against a database.
Is my text uploaded to a server?
No. This tool runs entirely in your browser, so what you paste never leaves your device.