SQL Input
1 linesFormatted SQL
All formatting happens in your browser — your data never leaves your device.
What is a SQL Formatter?
A SQL Formatter beautifies SQL queries by adding proper indentation, line breaks, and keyword casing — transforming a single unreadable line of SQL into a structured, maintainable query. It supports MySQL, PostgreSQL, SQLite, and SQL Server dialects.
How to Use It
- 1Paste your SQL query into the input area
- 2Select your SQL dialect (MySQL, PostgreSQL, SQLite, T-SQL, etc.)
- 3Toggle 'Uppercase Keywords' to apply the standard convention
- 4Click 'Format' and copy the formatted query
Example
select u.name,o.total from users u inner join orders o on u.id=o.user_id where o.total>1000 order by o.total desc → formatted into a clean 6-line query with uppercase keywords and proper JOIN indentation.
Why Use It
- Improve SQL readability before sharing queries in code reviews or documentation
- Standardize query formatting across a team's codebase
- Debug complex queries by making JOIN and WHERE conditions visually clear
- Format auto-generated or ORM-produced SQL for manual inspection