SQL Formatter

Format SQL across 8 dialects with full options, plus a lint pass that flags SELECT * and dangerous UPDATE/DELETE without WHERE.

100% Private
Your files never leave your device
Lightning fast
Optimised for speed
No sign-up
Use instantly, no account
Dialect
Indent
Max line width
Keywords
Identifiers
Data types
Functions
Input
Formatted

Format SQL across eight dialects — Standard, PostgreSQL, MySQL, SQLite, MariaDB, T-SQL, BigQuery, and Snowflake — with control over indent, line width, keyword case, identifier case, and comma style. Primova also lints your query for the easy footguns (SELECT *, missing WHERE on UPDATE/DELETE) and suggests the right dialect when it spots clear signals.

How to use SQL Formatter

  1. 1Paste or type SQL into the input.
  2. 2Pick a dialect, or accept the detected suggestion when one shows up.
  3. 3Tune indent, max line width, keyword/identifier case, and comma placement.
  4. 4Copy the formatted SQL, download a .sql file, and review any lint warnings below.

Lint catches the easy footguns

Most online SQL formatters only pretty-print. Primova also runs a small lint pass that surfaces the mistakes that actually cause incidents: SELECT * (slow and brittle when schemas change), UPDATE without a WHERE clause (every row gets the new value), DELETE without WHERE (the table empties), TRUNCATE, and DROP. Each warning explains the risk in one line so it’s obvious before you run the query.

String literals and comments are stripped before analysis so the checks don’t fire on text that only appears inside a quoted value or a `-- comment`.

Dialect detection

Many copy-pasted queries are accidentally formatted with the wrong dialect, which silently changes how keywords like LIMIT, TOP, OUTPUT, or backticks render. When Primova sees a distinctive signal — backticks for MySQL, $1 placeholders for Postgres, TOP/OUTPUT for T-SQL, QUALIFY for BigQuery — it suggests the matching dialect in a single click. Dismiss the hint if you want; the formatter keeps using whatever you chose.

Frequently asked questions

No. Formatting, linting, and dialect detection all happen in your browser, so queries — which often include sensitive table names or values — never leave your device.
Standard SQL, PostgreSQL, MySQL, SQLite, MariaDB, T-SQL (SQL Server), BigQuery, and Snowflake. Each respects that dialect’s reserved words and quoting style.
SELECT *, UPDATE without WHERE, DELETE without WHERE, TRUNCATE TABLE, and DROP statements. Comments and string literals are excluded, so flags don’t trigger on text inside quotes.
Yes. Keywords and identifiers each have their own UPPER / lower / Preserve setting, and commas can be placed after, before, or in a tabular layout. There’s also a max-line-width selector to keep long expressions readable.
Not as a separate mode, but setting a very large max line width and Preserve casing gives a near-minified result. The primary use case here is readability and review, not transport size.
Yes — free with no sign-up, no limits, and no queries leave the page.

Still have questions?

If you can’t find the answer you’re looking for, our support team is here to help.

Contact Support
Secure Fast Private
More tools

Keep going.

Browse all tools