Developer Tools

Formatters & Validators

SQL Formatter

Format SQL queries for readability.

SQL0 chars
SQL rapi

Guide & explanation

The SQL Formatter reflows a query for readability: keyword casing, clause indentation, and expression alignment.

Dialects

SQL syntax differs between engines. Pick the matching dialect (Standard SQL, MySQL, MariaDB, PostgreSQL, SQLite, BigQuery, Snowflake, Redshift, T-SQL, PL/SQL, Spark, Trino) so keywords and identifier quoting are recognised correctly.

Example

select id,name from users where active=1 order by name

becomes

SELECT
  id,
  name
FROM
  users
WHERE
  active = 1
ORDER BY
  name

Options

  • Dialect — the grammar rules to apply.
  • Keyword caseUPPER, lower, or leave as written.
  • Indentation — 2, 4 spaces, or tab.

The formatter only reflows layout; it does not run, check, or optimise the query.