SQL Formatter
SELECT, FROM, WHERE, JOIN, GROUP BY and ORDER BY each start a new line.
How SQL Formatter works
Re-indent SQL by putting each major clause on its own line. SELECT, FROM, WHERE, JOIN, GROUP BY and ORDER BY each start a new line. Everything happens inside this page: the tool reads your input, runs the calculation or conversion locally, and hands the result back to you. Nothing is transmitted, because there is no backend to transmit it to.
That design choice is deliberate. Most free tool sites upload your files to a server, process them there, and quietly keep a copy. Toolcin cannot do that — the site is a set of static files. If your connection dropped the moment the page finished loading, every tool would still work.
Clause per line
The formatter puts each major clause on its own line: SELECT, FROM, WHERE, GROUP BY, ORDER BY, HAVING, LIMIT, JOIN and ON. Long generated SQL becomes something a human can read in one pass.
Keywords are recognised case-insensitively, so select, Select and SELECT all trigger a break. The output preserves the case you typed rather than forcing upper case.
What it will not do
It does not parse SQL. A keyword inside a string literal may trigger a line break, and a subquery is indented only one level rather than nested. Function arguments and CASE expressions are left as written.
For a real formatter, use one that builds an AST — this is a readability aid for a pasted query, not a linter.
| Before | After |
|---|---|
| select a from t where b=1 | three lines |
| ... join u on u.id=t.id | JOIN and ON on their own lines |
| ... group by a order by a | GROUP BY then ORDER BY |
Where formatting pays off
Reviewing a query someone else wrote, putting SQL into a ticket or a migration file, and spotting a missing WHERE clause — which is much easier when the clauses are on separate lines.
Good to know
- Works offline once loaded, including on flights and in locked-down networks.
- No file size limit beyond your device's own memory.
- Free to use, with no account and no usage counter.
- Results are produced locally, so they are not logged or shared with anyone.
Questions
Is anything uploaded when I use SQL Formatter?
No. The calculation runs in your browser with JavaScript, so the values you enter never leave your device.
What should I check before relying on the result?
SELECT, FROM, WHERE, JOIN, GROUP BY and ORDER BY each start a new line. Treat the output as an estimate and verify anything critical independently.
Does it validate the query?
No, it only lays it out.
Can it minify?
Not on this page; it only formats.
Keep going
More files tools
JSON to TypeScript
Turn a JSON sample into TypeScript interfaces automatically. Nested objects become their own interface, and arrays become typed arrays.
Open toolMerge PDF
Combine several PDFs into one document in the order you choose. Pages, bookmarks and text stay intact.
Open toolSplit PDF
Extract any page range from a PDF into a new file. Enter a range like 1-3 or 2,5,7 and get exactly those pages as a new PDF.
Open toolRotate PDF
Rotate all pages or just a few, by 90°, 180° or 270°. Scanned documents often arrive sideways; rotate the pages you need and download a fixed copy.
Open toolCSV to Excel
Turn CSV data into a real Excel .xlsx workbook. Paste CSV and download an .xlsx file built by SheetJS in your browser — numbers stay numbers.
Open toolExcel to CSV
Convert the first sheet of an Excel file into clean CSV. Reads .xlsx, .xls and .csv locally and exports the first sheet as CSV you can paste anywhere.
Open tool