SQL Formatter

Paste a SQL query and format it for readability. Choose how keywords are capitalized.

SQL FormatterRuns in your browser

This is a lightweight formatter, not a full SQL parser. Quoted strings, quoted identifiers and comments are kept exactly as written. Dialect-specific syntax is left unchanged but may not be laid out perfectly.

Your input stays in your browser and is not sent to a server by this page.

About this tool

SQL formatting only changes whitespace and keyword case. Always review formatted queries before running them on a database.

Related tools