SQL Formatter
Split long SQL queries into clean, indented lines.
Runs on sql-formatter · author: sql-formatter-org · license: MIT · source code
About this tool
The SQL formatter splits a long query into clean lines with each keyword and condition in place. MySQL, PostgreSQL, SQLite, SQL Server and standard SQL are supported.
How to use it
- 1Paste your SQL query.
- 2Choose the dialect and keyword case.
- 3Press “Format” and copy the result.
FAQ
Does formatting change what the query does?
No. Only whitespace, line breaks and keyword case change. Quoted strings stay exactly as they were.
Is the SQL Formatter free?
Yes, completely free with no sign-up and no usage limits.
Are my files or text uploaded anywhere?
No. Everything runs right in your browser: your files and text are never uploaded, never stored by us and never seen by anyone but you.
Does it work on a phone?
Yes, it works in any modern browser on phones, tablets and computers.