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

  1. Paste your SQL and pick a dialect.
  2. Click Format to beautify or Minify to compact it.
  3. Copy the result to your clipboard.

Frequently asked questions

Is my SQL uploaded?
No. Formatting runs entirely in your browser. Your queries never leave your device.
Which dialects are supported?
Standard SQL plus PostgreSQL, MySQL, SQLite, and T-SQL (SQL Server).
Can I minify SQL?
Yes. Use Format for indented output or Minify for a compact single line.

Related tools

View all Developer Tools