SQL Formatter
Format messy SQL queries with clean indentation and uppercase keywords for MySQL, PostgreSQL, SQL Server and more. Free online tool.
Formatted SQL
Ad space · responsive
How to use SQL Formatter
- Paste a query.
- Choose keyword case and indentation.
- Copy the formatted SQL — or switch to One line for embedding in code.
Privacy
Runs entirely in your browser. Nothing you enter or open here is uploaded.
Questions
Which databases?
MySQL, PostgreSQL, SQLite, SQL Server and standard SQL. Only whitespace and keyword case change, never the query's meaning.