oLoveTools
SQL workbench

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.

Keywords
Indent
Your query
Result

Nothing runs on its own. Press Format when your query is ready.

ShortcutsCtrl+EnterFormatCtrl+MMinifyCtrl+/Comment the selectionCtrl+Z / Ctrl+YUndo and redo
Review

Nothing loaded yet.

What this query does

The breakdown shows up as soon as there is a statement.

Keep goingThe query travels with you — no download, no re-upload

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

1

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.

2

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.

3

Press Format

The engine reformats, the review panel lists what is worth checking, and the outline shows the statements, tables, joins and CTEs involved.

4

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.

Part of the oLoveTools suite
oLoveTools

Format, check and understand SQL — 19 dialects, entirely in your browser.

Everything runs in this tab

The formatter, the tokenizer, the linter and the outline are JavaScript running in your browser, with the heavy pass moved to a Web Worker so the page stays responsive. There is no API behind this page: turn off your connection after it loads and it keeps working.

What people use it for

Making a 400-character one-liner from an ORM log readable, standardising the style of a migration before it goes into review, finding the parenthesis that breaks a stored procedure, or working out which tables a query someone sent you actually touches.

Why local matters here

A production query is rarely harmless: it carries table and column names, business rules, ids and sometimes literal customer data. Pasting one into a site that formats it on a server hands all of that to a third party. Here it never leaves the tab, and closing it is the whole cleanup.

sql formattersql beautifierformat sql onlinesql validatorsql minifierpostgresql formattermysql formattert-sql formatterbigquery formattersnowflake formattersql pretty printsql linter
© 2026 oLoveToolsAbout

SQLFlow | SQL formatter, beautifier and validator for 19 dialects

Format, minify and check SQL in your browser. Nineteen dialects, syntax highlighting, a linter that points at the line, and a query outline. Nothing is uploaded.

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.

Keywords

sql formatter, sql beautifier, format sql online, sql validator, sql minifier, postgresql formatter, mysql formatter, t-sql formatter, bigquery formatter, snowflake formatter, sql pretty print, sql linter