SQL Formatter & Beautifier — Free Online Tool
Paste any SQL query and format it with consistent indentation. Supports MySQL, PostgreSQL, SQLite, BigQuery, and T-SQL dialects. Options for indent size (2 or 4 spaces), keyword uppercase, and blank lines between queries.
100% client-side. No uploads. Your data never leaves your browser.
How to use SQL Formatter & Beautifier
- Paste your SQL into the input.
- Select your SQL dialect.
- Choose indent size and keyword case.
- Click 'Format SQL' and copy or download the result.
Frequently Asked Questions
Which SQL dialects are supported?
Standard SQL, MySQL, PostgreSQL, SQLite, BigQuery, and T-SQL (Microsoft SQL Server). Select your dialect for dialect-specific formatting.
Does this validate SQL syntax?
No — sql-formatter only formats, it doesn't validate. Syntax errors may produce unexpected output but won't crash.
What does keyword uppercase do?
When enabled, SQL keywords (SELECT, FROM, WHERE, etc.) are converted to uppercase, which is the conventional style for SQL.
Related tools
Related reading
Browse all free tools · theproductguy.in