SQL Formatter & Linter

Format SQL queries in your browser, tune dialect-aware layout rules, and catch common lint issues before you copy or download the result.

Source SQL
Paste SQL directly or import a local file. The formatter and lint checks update from this source query.
Formatted SQL
Dialect-aware SQL formatting runs in your browser with the options below. Copy or download the result when it looks right.
SELECT
  id,
  email,
  created_at
FROM
  users
WHERE
  status = 'active'
ORDER BY
  created_at DESC;
Options
Control formatting and lint behavior without changing the original query text.
Formatting

Choose the SQL dialect and layout rules that shape the formatted output.

Linting

Turn on the query checks that matter for review, readability, and safer mutations.

Set 0 to disable the line-length rule.

Lint results
Review parse errors, warning-level query risks, and informational style suggestions here.

What Is SQL Formatter & Linter?

SQL Formatter & Linter reformats SQL queries in your browser and checks them for a small set of high-signal issues at the same time. It is useful when you want cleaner query layout, consistent keyword casing, and quick feedback on risky patterns like SELECT * or UPDATE statements without a WHERE clause.

When To Use It

Use this tool when you are reviewing hand-written SQL, cleaning up pasted queries before sharing them, or comparing formatting across different SQL dialects. It works well for ad hoc query review, pull request cleanup, and browser-only formatting without sending your SQL to a server.

What It Checks

This rewrite keeps the formatter and linter separate but coordinated. Formatting uses sql-formatter with dialect-aware layout options, while linting surfaces parse errors, missing semicolons, broad SELECT * usage, unsafe mutations, long lines, and keyword case drift.