Developer
SQL formatter
Format messy SQL queries for PostgreSQL, MySQL, SQL Server, and more.
Free to use · Runs in your browser · No signup
This tool works in your browser. Enable JavaScript to select files and create your download.
How to use SQL formatter
- Paste your SQL query.
- Choose the dialect and keyword case.
- Copy or download the formatted SQL.
What you need
Nothing to upload. Type or paste directly into the tool; results update as you go.
Your result
Formatted SQL.
Before you start
Formatting changes whitespace and keyword case only, not query meaning. Dialect-specific syntax may need the matching dialect selected.
Questions about SQL formatter
How do I use SQL formatter?
Paste your SQL query. Choose the dialect and keyword case. Copy or download the formatted SQL.
What does SQL formatter produce?
Formatted SQL.
What should I check before using SQL formatter?
Formatting changes whitespace and keyword case only, not query meaning. Dialect-specific syntax may need the matching dialect selected.
Is what I type sent anywhere?
No. The calculation runs in your browser, and the text or numbers you enter are not uploaded or stored.