SQL Formatter
Beautify SQL queries for MySQL, PostgreSQL and more.
SQL input
Formatted SQL
Free online SQL formatter and beautifier. Pretty-print messy SQL with proper indentation and uppercased keywords, with a dialect picker for standard SQL, MySQL and PostgreSQL. Runs in your browser.
How to use the SQL Formatter
- 01Paste your SQL query into the input box.
- 02Pick the dialect — standard SQL, MySQL or PostgreSQL.
- 03Click Format to get clean, readable, indented SQL and copy it.
Frequently asked questions
Which SQL dialects are supported?
The formatter supports standard SQL, MySQL and PostgreSQL. Pick the one that matches your database for the most accurate formatting.
Is my query uploaded?
No. Formatting happens entirely in your browser, so your SQL never leaves your device.