SQL formatter

Free

Online SQL formatter: indent and readable SQL. Free.

Input

Result

Dialect—
Input0
Output0

How this SQL formatter works

Paste a query or a .sql file. The tool indents it in the browser: SELECT, JOIN, INSERT and the rest become readable.

The CSV converter produces INSERT statements. This tool makes them readable and does not run them. Dialect changes quotes and vendor keywords (MySQL, PostgreSQL, SQLite).

Format Readable SQL

Indent, new lines on clauses, clear keywords.

Dialect MySQL and more

MySQL, MariaDB, PostgreSQL, SQLite, T-SQL, PL/SQL, BigQuery.

File Paste or upload

.sql, max 1 MB. Nothing is sent to the server.

Important: It does not execute SQL. It does not fix logic errors. If the parser rejects the dialect, switch it or simplify the query.

Useful notes

  •   CSV → INSERT stays in the CSV converter. This tool only indents the resulting SQL.
  •   Dialect matters: MySQL backticks, PostgreSQL quotes, TOP vs LIMIT.
  •   `--` and `/* */` comments are usually kept. CTEs and window functions depend on the dialect.
  •   Nothing is saved on the server. Reloading the page clears the fields.