SQL Formatter
Format SQL query, normalize indentation, and preview highlighted output
Paste SQL and get auto-formatting after a short delay. Supports Generic SQL, MySQL, PostgreSQL, SQLite, and SQL Server dialects.
Options
0/100000 characters
Please enter SQL query
What is SQL Formatter?
SQL Formatter is a developer tool that restructures SQL queries into clean, readable statements. It helps standardize indentation, keyword case, and clause spacing so complex queries are easier to debug and review.
How to format SQL online?
- Paste your SQL query in Input SQL.
- Choose dialect, keyword case, indentation, and comma style.
- Wait a short moment for auto-formatting to update output.
- Use icon actions for Copy, Download, Clear, or Minify.
SQL formatting example
SELECT id, name FROM users WHERE age > 18 ORDER BY created_at DESC