SQL formatter online

Format SQL queries

Paste SQL and turn compact queries into readable code with dialect-aware formatting.

Paste SQL to start.

How to use

  1. Paste a SQL query into the input box.
  2. Select the closest SQL dialect.
  3. Format or minify the query and copy the output.

Common uses

Query review

Make long SQL queries easier to read before debugging joins, filters, and grouped results.

Team sharing

Format SQL before adding it to documentation, pull requests, tickets, or database notes.

Example

Paste a one-line SELECT query and format it to separate columns, joins, and WHERE conditions.

FAQ

Does formatting run on a server?

No. The formatter runs in your browser from a frontend library.

What if the formatter library cannot load?

The page shows a clear unavailable message and keeps your input unchanged.

Related tools

More developer tools