SQL Formatter
Pretty-print SQL with dialect-aware formatting for MySQL, PostgreSQL, SQLite, BigQuery, and more. Paste messy queries from logs or ORMs and copy clean, uppercased-keyword SQL for reviews โ nothing is executed or uploaded.
Runs entirely in your browser. Your data never leaves this device.
- SQL pretty-print
- Multiple dialects
- sql-formatter engine
- One-click copy
- Private queries
How it works
- Paste a SQL query or script into the editor.
- Click Format to pretty-print with consistent indentation via sql-formatter.
- Copy the formatted SQL for reviews, tickets, or IDE paste-back.
Key features
- SQL pretty-print
- Multiple dialects
- sql-formatter engine
- One-click copy
- Private queries
FAQ
Which SQL dialects work?
Standard SQL dialects supported by sql-formatter (e.g. sql, mysql, postgresql, sqlite, bigquery). Pick a dialect if keywords differ.
Is my query sent to a server?
No. Formatting runs locally in your browser.
Does it validate SQL?
It formats; it does not execute or fully validate against a database engine.
Can I minify SQL?
Use Format with compact options off; for size reduction prefer removing comments manually or in your build.
Keep building
Related developer tools
Format, validate, minify, and sort JSON in your browser. Privacy-first โ nothing leaves your device.
Online code compare and difference checker with side-by-side additions and deletions.
Live regular expression testing with match highlights, flags, and capture groups.