Reading dense one-line SQL is one of the least-fun parts of working with databases. A long join chain crammed onto a single line, a CTE with no indentation, an UPDATE buried in a WHERE clause: any of these can hide bugs that a well-formatted version makes obvious. This formatter takes any SQL you paste in and rewrites it into multi-line, indented form using the popular sql-formatter library, with dialect-aware keyword casing and clause alignment. It supports standard SQL plus the most common dialects: PostgreSQL, MySQL, MariaDB, SQLite, BigQuery, Snowflake, Redshift, and N1QL. The conversion runs entirely in your browser, so you can paste production queries without any of the text leaving your machine. The output is the same SQL semantically, just easier to read, and you can copy it back into your migration file, your worksheet, or wherever you need it.
Frequently asked questions
The dialect selector covers standard SQL plus PostgreSQL, MySQL, MariaDB, SQLite, BigQuery, Snowflake, Redshift, and N1QL. Pick the closest one for the best keyword-casing and alignment behavior. If your dialect is not listed, the standard SQL option handles the common syntax cleanly.
Related tools
- Regex TesterTest a regular expression against any text, see matches and capture groups live.
- JSON Formatter & ValidatorFormat, validate, and minify JSON instantly in your browser.
- XML Formatter & MinifierFormat any XML, RSS feed, SOAP response, or SVG with proper indentation.
- Snippet VaultSave text, JSON, regex, code, or config snippets with optional shareable links and expiry.