NX-85 · Developer Tools

SQL Formatter

Turn a wall of SQL into clean, readable, consistently indented queries.

Input

Output

Paste a SQL query above and click "Format".

A lightweight, keyword-based formatter — not a full SQL parser. It won't catch invalid SQL, only reformat it.

About SQL Formatter

Paste a minified or inconsistently formatted SQL query — SELECT, INSERT, UPDATE, DELETE, or a query with JOINs and subqueries — and get it back with keywords capitalized, clauses on their own line, and consistent indentation, so it's actually reviewable in a PR or a support ticket.

A formatter, not a parser

This reformats based on keyword structure rather than validating query correctness — it's a lightweight formatter, not a full SQL parser. It won't catch a syntax error or validate that your query is actually correct.

What it handles

SELECT, INSERT, UPDATE, and DELETE statements, including queries with JOINs and subqueries — reformatted with capitalized keywords and each clause on its own line.

How to use it

Paste your SQL query, and the formatted version appears automatically — keywords capitalized, clauses broken onto their own lines, consistently indented.

Use cases

Clean up a minified query before pasting it into a pull request. Make a support ticket's SQL actually readable. Quickly reformat a query pulled from a log or a database tool's export.

Limitations

Doesn't validate query correctness or catch syntax errors — it reformats based on keyword structure, so an invalid query will still be reformatted rather than flagged.

Does this validate whether my query is correct?

No — it's a formatter, not a parser. It reformats based on keyword structure and won't catch a syntax error.

What SQL dialects does this support?

It formats based on common keyword structure (SELECT, INSERT, UPDATE, DELETE, JOINs, subqueries) rather than a specific database's dialect rules.

Is this free to use?

Yes — it's completely free, with no sign-in required.