SQL Formatter
Format, beautify, or minify SQL in your browser. Dialect support for PostgreSQL, MySQL, SQLite, and T-SQL — no upload, free online SQL formatter.
Format and minify SQL privately
Beautify or compact SQL with dialect-aware formatting. Everything runs locally — nothing is sent to a server.
What you can do with it
- Clean up a pasted query
- Pretty-print a one-line query from logs so joins and filters are readable.
- Prepare a compact snippet
- Minify SQL before embedding it in a config or ticket.
How to format SQL
- Paste your SQL and pick a dialect.
- Click Format to beautify or Minify to compact it.
- Copy the result to your clipboard.