SQL Formatter

SQL formatter & beautifier

Paste a cramped, one-line query and get clean, indented SQL with consistent keyword casing — instantly and privately.

▌ SQL in
▌ Formatted

Readable SQL, instantly

Queries have a way of growing into long, unbroken lines that are painful to read and review. This formatter puts each major clause — SELECT, FROM, WHERE, JOIN, GROUP BY, ORDER BY — on its own line, indents subqueries, breaks long column lists, and normalises keyword casing, so the structure of a query becomes obvious at a glance. Choose uppercase, lowercase, or leave keyword casing as you typed it.

Private and quote-aware

Everything runs in your browser; your SQL is never uploaded, which matters when queries contain table names or values you'd rather not paste into a random website. The formatter is aware of quoted strings and comments, so a comma or keyword inside 'a, b' won't be mistaken for query structure. For very complex statements — deeply nested CTEs, vendor-specific syntax — it's a fast first pass; always give the result a quick read before running it.

FAQ

Does my SQL get sent to a server?
No. The formatter runs entirely in your browser, so the query you paste never leaves your device — safe for real table names and values.
Can it change keyword capitalisation?
Yes. Pick UPPERCASE or lowercase to normalise SQL keywords like SELECT and WHERE, or choose 'keep as typed' to leave your casing untouched.

Related tools