SQL Formatter
Pretty-print and indent SQL queries for MySQL, PostgreSQL, SQLite, T-SQL and standard SQL.
Paste a cramped or auto-generated SQL query and get it reformatted with consistent indentation, capitalized keywords, and clean line breaks around clauses like SELECT, JOIN, and WHERE. Supports dialect-aware formatting for MySQL, PostgreSQL, SQLite, T-SQL, and standard SQL, which matters for quoting and dialect-specific syntax. Useful for cleaning up a query pulled from application logs or a database GUI before sharing it in a code review. Formatting runs entirely in your browser.
Loading tool
How it works
- 01
Paste your SQL query.
- 02
Choose the SQL dialect.
- 03
Copy the formatted output.
Details
- Category
- Developer & data
- Runs
- In your browser
- Files uploaded
- No
- Cost per run
- Free
- Sign-in
- Not required
- Works offline
- Yes, once loaded
Last updated 2026-08-03
Common questions
Does it validate my SQL?
It formats syntax it recognizes; it isn't a full SQL parser or validator.
Does it upload my queries?
No - formatting runs entirely in your browser.
Which SQL dialects are supported?
MySQL, PostgreSQL, SQLite, T-SQL, and standard SQL formatting rules are all available as options.
Does it reformat stored procedures or scripts?
It's built for formatting individual queries and statements; very large multi-statement scripts may format less predictably.