SQL Formatter
Format SQL queries.
100% private Runs locally No sign-up
Loading tool…
Heavy libraries load on demand so the page shell stays fast.
About SQL Formatter
SQL Formatter pretty-prints queries in your browser so reviews and diffs stay readable — without pasting production SQL containing customer data into a hosted formatter.
How to use SQL Formatter
- 1Paste or type the SQL you want to format.
- 2Run format to apply indentation and keyword casing.
- 3Copy the result back into your editor or PR.
- 4Validate separately against your database engine.
Frequently asked questions
Which SQL dialect?
Formatting is largely dialect-agnostic for common SELECT/JOIN shapes. Vendor-specific extensions may need hand tweaks.
Does it execute queries?
No. It only formats text. Nothing is sent to a database from Toolncy.
Minify SQL?
Prefer readable SQL in repos. Minify only if a specific pipeline requires it.
Secrets in SQL?
Strip connection strings and literals with PII before sharing formatted output.
JSON too?
Use JSON Formatter for JSON payloads; SQL Formatter is for query text.