SQL Formatter

Clean up common SQL queries for reviews, docs, or debugging. Adjust keyword casing, indentation, and line breaks without reaching for a server-side formatter.

Format SQL

Formatted SQL


        

How it works

This formatter targets common query shapes such as SELECT, INSERT, UPDATE, and DELETE. It identifies major clauses, adds line breaks, and indents nested sections using the spacing level you choose.

Because this is a practical browser formatter rather than a full SQL parser, unusual vendor-specific syntax may need manual cleanup after formatting. Quoted strings and comments are preserved as plain text wherever possible.

Use the minify option when you want a compact one-line query for logging or quick comparisons.