SQL Formatter

Format SQL queries for readability with this free, basic formatting tool. It uppercases major keywords and puts major clauses on their own lines. This formatter runs entirely in your browser.

How it works โ€” basic formatting: This is a basic formatter, not a full SQL parser. It uppercases major keywords such as SELECT, FROM, WHERE, GROUP BY, ORDER BY, JOIN, INSERT, UPDATE, DELETE, AND, OR and LIMIT, starts major clauses on a new line, and indents AND and OR lines. It does not understand nested queries, quoted strings or comments, so check complex queries after formatting.