SQL Formatter
Format & beautify SQL queries
Free forever — no sign-up, nothing uploaded. Files never leave your device.
SQL Formatter
Format & beautify SQL queries
Drop your file here
or browse from your device
Browse filesdocument.pdf
1.2 MB
report.pdf
860 KB
100% private
Nothing is uploaded — everything runs in your browser.
Free forever
No account or payment required.
No sign-up
Open the tool and start using it right away.
Local processing
Processing time depends on your input and device.
About this tool
Pretty-print unreadable SQL for MySQL, PostgreSQL, SQLite and more, with configurable keyword casing.
The SQL Formatter is a precision code beautifier that takes messy, minified, or inconsistently formatted SQL queries and transforms them into clean, readable, properly indented code. It supports all major SQL dialects — PostgreSQL, MySQL, SQL Server, Oracle, and SQLite — correctly handling dialect-specific syntax like backtick quoting, bracket identifiers, and proprietary functions.
Paste a long query from a log file, a tool output, or ORM-generated code and the formatter applies consistent capitalization of keywords, logical indentation of JOIN and subquery clauses, aligned comma-separated lists, and proper line breaks. The result is SQL that any team member can read and understand in seconds, reducing code review friction and debugging time.
The formatter runs entirely in your browser, which is especially important when working with production SQL that may contain table names, column names, or data samples that are sensitive. No query content is ever sent to an external server.
Key features
Everything you get with SQL Formatter — no premium upsell.
Support for PostgreSQL, MySQL, SQL Server, Oracle, and SQLite dialects
Consistent keyword capitalization (upper, lower, or preserved)
Proper indentation of JOINs, subqueries, CTEs, and CASE expressions
Comma-aligned column lists for improved readability
One-click copy to clipboard for pasting into your editor or IDE
Fully client-side processing with zero server transmission
How to use SQL Formatter
Follow the steps below to use the tool.
- 1
Paste SQL Query
Insert your minified, log-exported, or ORM-generated SQL into the input area.
- 2
Select Dialect
Choose your target SQL dialect to ensure correct handling of dialect-specific syntax and quoting.
- 3
Format
The query is instantly beautified with consistent casing, indentation, and line breaks.
- 4
Copy Output
Use the copy button to grab the formatted SQL for use in your editor, migration files, or documentation.
Still free, still private — your files never leave your device.
Launch SQL FormatterFrequently asked questions
Quick answers before you launch the tool.
Related tools
Saved you searching — here are similar utilities.