SQL Formatter
Paste messy SQL and get clean, readable, indented code with keywords in upper case.
SQL
Formatted SQL
Recent formatting on this device
How this tool works
Method. Keywords are upper-cased, each clause starts on its own line, AND and OR are indented, and subqueries are indented inside their parentheses. Text inside quotes is never changed.
Privacy. Everything happens in your browser. Nothing is uploaded or shared; the recent-formatting record stays on this device only.
Limits. SQL up to 200 KB; longer input is trimmed with a warning. Unbalanced parentheses are flagged.