- What is a SQL formatter?
- A SQL formatter takes a query that is on one line or has messy spacing and rewrites it with each clause on its own line and the parts indented. It does not change what the query does, only how it looks, so it is easier to read, review, and debug.
- How do I format a SQL query?
- Paste your query into the input box, pick your database dialect and indentation, then click Format. The clean version appears below. Click the copy button to copy it, or download it as a .sql file.
- Which SQL dialects are supported?
- You can format standard SQL, MySQL, PostgreSQL, SQLite, SQL Server (Transact-SQL), and BigQuery. Pick the one that matches your database so keywords and quoting are handled correctly.
- Does the formatter change my query?
- No. It only changes spacing, line breaks, and the case of keywords. The tables, columns, conditions, and logic stay exactly the same, so the formatted query returns the same results as the original.
- Can it uppercase the keywords?
- Yes. Uppercase keywords is on by default, so SELECT, FROM, WHERE, and the rest come out in capitals. Turn it off if you prefer to keep your keywords lowercase or exactly as you typed them.
- Is my SQL kept private?
- Yes. All formatting runs in your browser. Your query is never uploaded to a server or saved anywhere, so you can safely paste in SQL that references private tables or data. Once the page has loaded you can even use it offline.