Input
Output
How this one works
Paste a query on the left and the formatted version appears on the right as you type. Each clause (SELECT, FROM, JOIN, WHERE, GROUP BY) starts on its own line, with its columns and conditions indented beneath it. Pick your database from the dialect menu so its own syntax, quoting and keywords are recognised.
Minify does the opposite: one line, comments removed, and string literals kept exactly as written, which is handy for pasting a query into code, a log search or a config file.
Questions
Is it safe to paste production queries here?
Yes. Formatting happens in your browser with JavaScript bundled into the page. The query is never sent to a server, logged or stored. Close the tab and it's gone.
Which SQL dialects are supported?
Standard SQL, MySQL, MariaDB, PostgreSQL, SQLite, SQL Server (T-SQL), Oracle (PL/SQL), BigQuery, Redshift and Snowflake. Choosing the right one matters for things like backtick or bracket identifiers, dollar-quoted strings and dialect-specific keywords.
Why does my query fail to format?
The formatter reads the query before laying it out, so it stops at anything it can't parse: an unclosed bracket, a missing clause or syntax from another database. The error gives the line and column. If the query runs on your database, choose that dialect: backtick identifiers, square brackets and @variables are only valid in some.
Does formatting change what my query does?
No. Only whitespace, line breaks and (if you choose) the case of keywords change. Table names, column names and string values are left exactly as you wrote them.