Skip to content
Toolden

TOOLDENDEVELOPERON-DEVICE

SQL Formatter: Format SQL Queries

Format SQL queries with syntax highlighting and indentation. Supports multiple SQL dialects.

0 chars · formatted live on the right.

Paste SQL on the left, pick a dialect, the formatted query appears on the right with consistent indentation.
Paste SQL on the left, or click Try sample to load an example.

No query yet, paste SQL on the left.

HOW TO USE

  1. 1Paste your raw SQL query on the left, or click Try sample.
  2. 2Pick your database dialect on the left.
  3. 3Read the reformatted query with consistent indentation on the right.
  4. 4Copy the formatted SQL back into your editor.

EXAMPLE

INPUT

SELECT id,name,price FROM products WHERE price>100 ORDER BY name;

OUTPUT

Multi-line, indented query with highlighted keywords, columns and operators

FAQ

Which dialects are supported?
MySQL, PostgreSQL, T-SQL, Oracle, and several others, pick the one that matches your database.
Does it fix broken SQL?
No, it reformats valid SQL for readability. Syntax errors are left for your database to report.
Is my SQL sent to a server?
No. Formatting runs entirely in your browser.

RELATED TOOLS