SQL formatter
Paste SQL and get it back cleanly indented, with keywords and clauses laid out to read. Pick the dialect so the formatting matches your database, or minify to a single line for a config or a log.
It uses the maintained sql-formatter library and runs entirely in the page, so no query you paste is sent anywhere.
Formatted
Formatted in your browser with sql-formatter. It changes only the layout, never what the query does, and nothing is sent anywhere.
Questions
- Is what I paste sent anywhere?
- No. Every tool in this kit runs in the page itself. There is no server here that receives what you paste, and you can check it in your browser's network tab: using a tool produces no request carrying your input at all.
- Which dialects are supported?
- Standard SQL plus the common ones: PostgreSQL, MySQL, MariaDB, SQLite, SQL Server (Transact-SQL), BigQuery and more. Picking the right one means dialect-specific syntax is laid out correctly rather than misread.
- Does it change what my query does?
- No. It only changes the spacing, line breaks and case of keywords. The statement itself is untouched, so a formatted query runs exactly as the original did. It does not execute anything.
- Can it fix broken SQL?
- No, and it does not try. It formats the SQL you give it. If a statement has a real syntax error the layout may look off around it, which is often a useful hint, but this is a formatter, not a linter or a fixer.
The other tools here
- JSON formatter, format, minify and validate
- Base64 encoder, encode and decode, text or file
- URL encoder, encode and decode, two rules
- UUID generator, version 4, one to a hundred
- Hash generator, sha-256, sha-1 and md5 at once
- JWT decoder, header, payload and expiry
- Regex tester, live matches, groups and flags
- Text diff, compare two blocks, by line or word
- Timestamp converter, unix time to a date, and back
- Cron explainer, a schedule, in plain english
- Colour converter, hex, rgb, hsl, and a contrast check
- Markdown preview, live preview, and copy the html
- JSON to CSV, an array of objects into a spreadsheet
- Data file converter, csv, json and excel, in any direction
- JSON and YAML, convert between json and yaml, either way
- JSON to TypeScript, a sample of json into typed interfaces
- Password generator, strong random passwords, made on your device
- Number base converter, hex, binary, decimal and octal, live
- curl converter, a curl command to fetch, axios or python