SQL Formatter is a free data & format tool that runs entirely in your browser — format SQL for 20 dialects. No upload, no account, no limits.
A dialect-aware SQL formatter. It parses the query rather than pattern-matching keywords, so it understands the syntax of 20 dialects — PostgreSQL, MySQL, SQL Server, Oracle, BigQuery, Snowflake, DuckDB, ClickHouse and more — and lays out clauses, joins, CTEs and nested expressions accordingly.
Every formatting option is exposed: indent style (including tabular alignment), tabs or spaces, where AND/OR lines break, the width at which expressions wrap, blank lines between statements, and independent upper/lower/preserve casing for keywords, identifiers, data types and functions.
Not as a linter, but it does parse: if the query is malformed the formatter reports the token and the line and column it stopped at, instead of silently producing mangled output. It checks syntax, never semantics — it cannot know whether your tables or columns exist.
The one you are targeting. Standard SQL is a safe default, but dialect-specific syntax — BigQuery's backticks, T-SQL's square brackets, PostgreSQL's dollar-quoted blocks — only formats correctly when the matching dialect is selected.
No. The formatter is a JavaScript library that runs inside this page, so the query never leaves your browser — which is what makes it safe to paste production SQL.
Every calculation happens on this page, in your own browser. Your input is never sent to a server, never logged and never used for training — which also means the tool keeps working when you are offline.