Related tools
- JSON Formatter and ValidatorFormat, minify, validate and repair JSON with exact error positions, a searchable tree view and key sorting. Also decodes JWTs, base64 and URL encoding.
- Markdown Table EditorPaste a table from Excel, a CSV, or HTML and get a tidy, aligned Markdown table back.
- SQLite BrowserDrop a .db file and browse tables or run SQL, all in your browser.
- Chart MakerPaste CSV and get a clean SVG or PNG chart with no watermark and no sign up.
- Diff CheckerCompare two texts side by side with highlighted changes, or as words, characters, and semantic JSON or YAML.
- Binary Format DecoderDecode protobuf, CBOR, and msgpack payloads to readable JSON in your browser.
What it does
Formats and normalizes SQL for nine dialects, including Standard SQL, PostgreSQL, MySQL, SQLite, SQL Server, BigQuery, Snowflake, MariaDB, and Oracle PL/SQL. Reindents clauses, breaks long statements onto readable lines, and lets you set keyword case, indent width, and line width. A minify mode does the reverse: it strips comments and collapses a query onto one line without touching anything inside quotes. Handles multiple semicolon-separated statements in one paste.
How to use it
Paste a query or a batch of statements into the left pane, or drop a .sql file on it, and the result appears live on the right. Pick the dialect that matches your database, then adjust keyword case, indent width, line width, or spacing between queries in the toolbar. Switch Mode to Minify for a one-line version. If the query does not parse, the offending line is marked and Go to line selects it. Copy or download the result, and the URL updates so you can share exactly what you see.
Why this one
Most online SQL formatters cap how much you can paste, run ads next to the output, or push a signup wall after a few uses, and all of them send your query to a server first. This one runs the formatter locally in your browser: your files and inputs never leave your device, there is no length cap, and no ads.
FAQ
- Which SQL dialects are supported?
- Standard SQL, PostgreSQL, MySQL, SQLite, SQL Server (T-SQL), BigQuery, Snowflake, MariaDB, and Oracle PL/SQL. Pick the one that matches your database for dialect-specific syntax like PostgreSQL casts or T-SQL square-bracket identifiers.
- Does it validate or run my SQL?
- No. It only reformats whitespace and casing, it does not check the query against a schema or execute it, so a formatted query can still fail at the database if the SQL itself is wrong. Minify mode does not parse the query at all: it removes comments and extra whitespace and leaves string literals and quoted identifiers exactly as written.
- Is my query uploaded anywhere?
- No, your files and inputs never leave your device. Formatting happens entirely in your browser.
Keyboard shortcuts: press ? anywhere on this page to see them.