SQL Formatter
Format and beautify SQL queries instantly. Supports SELECT, INSERT, UPDATE, DELETE, CREATE, and more. Also minifies SQL. Free, client-side.
Indent:
Frequently asked
questions
The formatter handles standard SQL syntax and most dialect-specific keywords from MySQL, PostgreSQL, SQLite, and Microsoft SQL Server. Proprietary functions and extensions are passed through unchanged.
No. Formatting happens entirely in your browser with JavaScript. Your queries are never transmitted anywhere.
SQL minification collapses all whitespace and newlines into a single line. This is useful when embedding SQL in code strings or config files where line breaks are inconvenient.