SQL Formatter
Format or minify a SQL query without touching any text or number
calendar_today Last updated: October 9, 2026
Result
Checked: no string, number or operator was changed — only spacing and keyword case.
This lays a query out; it does not check that it is valid SQL for your database. Runs in your browser — the query never leaves your device.
Sahel's SQL formatter lays a query out or minifies it, and checks that nothing but spacing and keyword case changed.
How does this tool work?
Paste the query
On one line or tangled.
Choose the layout
Neatly formatted or minified to one line.
Copy the result
With a check that the content did not change.
Frequently asked questions
Does it change what the query does? expand_more
Does it validate the SQL? expand_more
Which dialects work? expand_more
Are my queries sent anywhere? expand_more
Related tools
JSON Formatter & Validator
Format and validate JSON, with the error pinned to a line and column
Base64 Encoder & Decoder
Convert text to Base64 and back, with full Arabic support
Hash Generator
Compute MD5, SHA-1, SHA-256 and SHA-512 for any text or file
JWT Decoder
Read a token’s header, claims and expiry