SQL Formatter — Multi-Dialect
Turn compressed, chained SQL into a readable, review-friendly query. Choose your dialect — PostgreSQL, MySQL, BigQuery, Snowflake and more — for correct keyword handling.
Last updated: · Runs 100% in your browser
Result will appear here.// What is the SQL Formatter?
The SQL Formatter rewrites a query with consistent keyword casing, indentation and line breaks so its structure becomes visible at a glance. Long SELECT lists are broken one column per line, JOIN conditions sit next to the JOIN that owns them, and nested subqueries are indented to show how deeply they are buried. That structure is what makes a slow query reviewable: an accidental cartesian product or a filter applied at the wrong nesting level is obvious in formatted SQL and nearly invisible in a single 400-character line. Several dialects are supported, so vendor-specific syntax is preserved rather than mangled. Formatting is a pure text transformation performed in your browser — no query is ever executed and nothing is uploaded.
// Features
- ▸12+ SQL dialects supported
- ▸Adjustable indent (2, 4, tab)
- ▸Keyword case control (upper/lower/preserve)
- ▸Preserves inline and block comments
// How to use
- 01Paste your SQL.
- 02Pick the dialect that matches your database.
- 03Adjust indent and case if needed.
// Use cases
- ▸Making an ORM-generated query readable before profiling it.
- ▸Normalising SQL formatting across a team before code review.
- ▸Untangling a query with several nested subqueries.
- ▸Cleaning up a query pulled from a slow-query log for a bug report.
// FAQ
Your data never leaves your browser. This tool runs 100% locally — no upload, no logging, no analytics on your inputs.