SQL Formatter

Format SQL queries for MySQL, PostgreSQL, SQLite and more. Real-time with syntax highlighting.

Dialect:
Indent:
Keywords:
Paste SQL to get started

Cmd/Ctrl+Shift+F to reformat · Output updates in real-time

Loading formatter…

Frequently Asked Questions

Which SQL dialects are supported?
Generic SQL, MySQL, PostgreSQL, SQLite, Microsoft SQL Server (MSSQL), and Google BigQuery.
Can it format stored procedures and complex queries?
Yes. It handles JOINs, subqueries, CTEs (WITH clauses), window functions, and most SQL constructs.
Is this tool free to use?
Yes, completely free. No account, no subscription, no hidden limits.
Are my files safe? Do you upload them?
Your files never leave your device. All processing runs locally in your browser using JavaScript — nothing is sent to any server.
Does it work on mobile?
Yes, it works on all modern browsers including mobile Safari and Chrome on iOS and Android.