Format, check and understand any SQL query.
Nineteen dialects, a linter that names the line and column, syntax highlighting and a breakdown of every statement — all inside this tab, with nothing uploaded anywhere.
Nothing runs on its own. Press Format when your query is ready.
Nothing loaded yet.
The breakdown shows up as soon as there is a statement.
Nineteen dialects, not one
PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, BigQuery, Snowflake, Redshift, DuckDB, Oracle and more — each with its own reserved words, quoting and placeholders. Paste a query and the dialect is guessed for you.
Problems with a line number
Unclosed quotes and parentheses, a DELETE with no WHERE, a LIMIT with no ORDER BY. Every finding names the line and column, and clicking it puts your cursor there.
Off the main thread
Formatting happens in a Web Worker, so a 5 MB dump does not freeze the page while it runs. The timing shown next to the result is the real one.
Nothing leaves the tab
No upload, no account, no server round trip. Production queries carry table names, ids and business logic, and none of it travels anywhere.
How it works
Bring the query in
Paste it, drop a .sql file, load a sample, or let another tool hand it over. A dropped file waits: nothing is loaded or formatted until you say so.
Set the rules
Dialect, keyword case, indent width, where AND and OR sit, how wide an expression can get before it wraps. Every option changes the result the next time you format.
Press Format
The engine reformats, the review panel lists what is worth checking, and the outline shows the statements, tables, joins and CTEs involved.
Take it with you
Copy it, download the .sql, or send it straight to another tool in the suite — compare two versions, turn it into an image, hash it.
A formatter is only half the job
Most online SQL beautifiers do one thing: they add line breaks. That helps until the query is not just ugly but wrong — a quote left open somewhere in the middle, a parenthesis that never closes, a WHERE that got lost during a copy and paste. SQLFlow reads the query as tokens before touching it, so it can tell you the line and column where the problem starts instead of quietly producing mangled output.
That token pass also protects your data. Naive formatters run a regular expression over the whole text, which means the spaces inside 'hello world' get collapsed and a comma inside a comment starts a new line. Here a string literal and a comment are single, untouchable units: whatever you wrote inside them comes out byte for byte, whichever dialect you pick.
And because the same pass builds an outline, you get more than pretty text: the statements in the file, the tables each one touches, the CTEs, the joins and the placeholders waiting for a value. It is the difference between a query that looks tidy and a query you actually understand before running it against production.
Frequently asked questions
Is my query sent to a server?
No. The formatter and everything around it run in your browser. There is no upload and no API call, so the query never leaves your device.
Which SQL dialects are supported?
Nineteen: standard SQL, PostgreSQL, MySQL, MariaDB, SQLite, SQL Server (T-SQL), Oracle PL/SQL, BigQuery, Snowflake, Redshift, DuckDB, ClickHouse, Spark, Hive, Trino, Db2, SingleStore, TiDB and N1QL. Each brings its own reserved words, quoting rules and placeholder syntax, and the dialect is guessed from the query when it can be.
Does it change what my query does?
No. Formatting only touches whitespace and the case of keywords. String literals, comments and quoted names come out exactly as you wrote them — including the spaces inside them.
What does the review panel check?
Unclosed quotes, comments and parentheses; statements that do not start with a SQL keyword; DELETE and UPDATE without a WHERE; DROP and TRUNCATE; SELECT *; tables joined by comma with no condition; LIMIT without ORDER BY; INSERT with no column list; and a missing final semicolon. Each one names the line and column.
Why does nothing happen when I paste a query?
By design: the formatter only runs when you press Format, or Ctrl+Enter. If you prefer it to run as you type, turn on "Format as I type" under More options.
Can I format several statements at once?
Yes. Statements separated by semicolons are formatted together, and the outline lists each one with the tables it touches so you can jump straight to it.