Workspace Files stay on your device
code · format
SQL Formatter
Pretty-prints SQL: keywords upper-cased, each major clause (SELECT, FROM, JOIN, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT) on its own line, AND/OR indented, one space between tokens. Identifiers, strings and numbers are left exactly as written.
A little guidance. A better result.
How to use SQL Formatter
Keywords upper-cased, clauses on their own lines, AND/OR indented — identifiers and literals untouched.
Prepare your input
Paste SQL or load a query file.
Use the workspace
Inspect keyword casing and clause line breaks.
Check your result
Review identifiers and literals before using it.
Know the limits
Formatting does not execute the SQL or validate every database dialect.
Where does my input go?
This browser tool processes your input on your device. Optional analytics is a separate choice; it is not needed to use the tool. Keep your original until you have checked the result.
Read the privacy details →Made for the work in front of you.Report a problem ↗