SQL Formatter
FreePaste messy or minified SQL and get a clean, indented, readable query. Supports multiple SQL dialects including MySQL, PostgreSQL, SQLite, and T-SQL.
How to Use SQL Formatter
- 1
Paste your raw, minified, or poorly-formatted SQL query into the input panel.
- 2
Select your SQL dialect from the dropdown — MySQL, PostgreSQL, SQLite, T-SQL, or BigQuery — to ensure accurate keyword handling.
- 3
Toggle keyword casing between uppercase (SELECT, FROM, WHERE) and lowercase to match your team's style guide.
- 4
The formatted, indented query appears in the output panel. Click "Copy" to copy it to your clipboard.
Features
- ✓ Multi-dialect support
- ✓ Keyword case toggle
- ✓ Configurable indentation
Frequently Asked Questions
Which SQL dialects are supported?
MySQL, PostgreSQL, SQLite, T-SQL (MSSQL), BigQuery, and generic SQL. Select your dialect in the dropdown for accurate keyword casing.
Does it handle CTEs and subqueries?
Yes. The formatter handles complex multi-statement SQL including CTEs (WITH clauses), subqueries, JOINs, and stored procedure syntax.