Paste any SQL query and get it beautifully formatted — proper indentation, uppercase keywords, aligned columns. Browser-only.
A fast, no-fuss SQL beautifier that turns dense, one-line, or copy-pasted queries into clean, readable SQL with consistent line breaks and indentation. It targets ANSI-SQL plus the common dialects developers use day to day — MySQL, PostgreSQL, SQLite, SQL Server, and Snowflake.
The formatter breaks before major keywords (SELECT, FROM, WHERE, JOIN, GROUP BY, ORDER BY, AND/OR), optionally uppercases recognized keywords, and indents subqueries inside parentheses by your chosen amount — 2 spaces, 4 spaces, or a tab. People use it to:
Everything runs local and in-browser — your SQL, including any literal values, is never uploaded to a server, so it's safe to use on private or production queries.
It beautifies SQL queries by adding line breaks before major keywords, indenting subqueries, and optionally uppercasing keywords, turning dense or minified SQL into clean, readable code. It can also minify a query back to a single line.
The formatter targets ANSI-SQL plus common extensions used by MySQL, PostgreSQL, SQLite, SQL Server, and Snowflake — SELECT, INSERT, UPDATE, DELETE, CTEs, window functions, JOINs, and subqueries. Vendor-specific syntax such as procedural blocks and optimizer hints is passed through untouched.
Yes. The "Uppercase keywords" toggle uppercases recognized SQL keywords such as SELECT, FROM, WHERE, and JOIN. Turn it off to leave your keywords exactly as you typed them. Table names, columns, and string literals are never changed.
Use the indent dropdown to choose 2 spaces, 4 spaces, or a tab. The "Indent subqueries" toggle controls whether content inside parentheses is indented one level deeper, which makes nested subqueries easier to read.
No. The tool only reformats text — it does not parse for correctness, check syntax against a database, or execute the query. Your SQL is rearranged for readability but otherwise left semantically unchanged.
No. The formatter runs entirely in your browser. Queries — including any literal data — never leave your machine, so it's safe to use on private or production SQL.
Beautify (Format SQL) expands the query with line breaks and indentation for readability. Minify does the opposite — it collapses all whitespace so the query fits on a single line, which is handy for embedding SQL in code or configuration files.