SQL formatting docs
A short reference on formatting SQL for readability: what the formatter does, how each dialect differs, and what the options change. Formatting runs entirely in your browser — paste a query and format it, no sign-up.
Open the formatterWhat SQL formatting does
A formatter parses your query against a dialect’s grammar and rewrites it with consistent indentation, aligned clauses and normalised keyword casing. It doesn’t change what the query does — only how it reads. That’s the difference from a plain “beautifier” that only pushes whitespace around: a grammar-aware formatter understands JSONB operators, bracketed identifiers or STRUCT literals and keeps them intact.
Formatters by dialect
Beautifiers by dialect
Turn minified, single-line SQL back into readable, indented queries — per dialect.
Convert between dialects
A formatter re-indents; it won’t rewrite TOP into LIMIT or NVL into COALESCE. The AI converter translates queries between dialects — each guide shows exactly what changes.
SQL tools
Formatting options explained
Force keywords like SELECT, FROM, WHERE to UPPER, lower, or leave them as-is. Uppercase is the convention most teams review in.
How many spaces each nesting level adds. 2 spaces is compact; 4 is easier to scan in deeply nested queries.
The formatter wraps long SELECT lists and conditions once a line passes this width, so nothing runs off the screen.