SQL Formatter — Readable Queries in One Click

That 400-character WHERE-clause monster becomes a structured query: keywords uppercased, clauses indented.

Quick answer: Free SQL formatter: uppercase keywords, indent joins and conditions — messy queries become readable, all local.

How to use

  1. Paste the query.
  2. Click format.
  3. Copy the readable SQL.

About this tool

Reading someone else's SQL (or your own from last year) hurts. This formatter breaks queries at major keywords (SELECT/FROM/WHERE/JOIN/GROUP/ORDER), uppercases keywords, and indents consistently — read-only beautify, it never executes anything.

FAQ

Which dialects?
Standard SQL — MySQL/PostgreSQL/SQLite keywords all recognized.
Does it run my query?
Never — pure text formatting, no engine.
Format errors?
It formats best-effort; syntax errors are your database's job to catch.
Minify?
The output pastes into single line after trimming — minify via whitespace removal if needed.
Sensitive queries?
Nothing leaves the page — safe for internal SQL.
Vendor functions?
Left untouched — only keywords/casing/indentation change.