SQL Formatter
Runs in your browser — your data is never uploaded.
Turn a dense or single-line SQL query into a clean, readable, consistently indented statement — with keyword casing and dialect-aware formatting for MySQL, PostgreSQL, SQLite, MariaDB and T-SQL. Runs entirely in your browser, so queries touching real schemas or data never leave your device.
0 characters · runs entirely in your browser
How to use SQL Formatter
- 1
Paste your SQL query into the box.
- 2
Choose the SQL dialect that matches your database.
- 3
Click “Format”, then copy or download the result.
Share
Embed this tool on your site
Paste this where you want the tool to appear. It runs entirely in your visitor's browser — no uploads, no account, no tracking.
Please keep the attribution line — it's what keeps these tools free.
Need a different size, a dark theme, or a different tool? Build an embed lets you preview it first.
Frequently asked questions
Which SQL dialects are supported?+
Standard SQL, MySQL, PostgreSQL, SQLite, MariaDB and T-SQL (SQL Server) — each with dialect-specific keyword and syntax handling.
Does it validate my query?+
It formats syntactically parseable SQL; a query with a genuine syntax error returns a friendly error rather than a guessed-at reformat.
Is my SQL uploaded anywhere?+
No. Formatting runs entirely in your browser — nothing is sent to a server, which matters for queries that reference real table or column names.