SQL formatter & beautifier

Paste messy SQL and get clean, indented, readable code. Choose keyword casing and indent size, or minify to one line. A real tokenizer understands strings, comments, joins and subqueries — and nothing is uploaded.

Your SQL
Output
Keyword case
Indent

Minify strips comments and extra whitespace; Beautify keeps comments and lays the query out for reading.

Everything runs in your browser. No upload, no sign-up.

How it works

STEP 1

Paste your SQL

Drop in a query of any size — SELECT, JOINs, subqueries, comments and strings are all handled.

STEP 2

Pick a style

Choose UPPERCASE, lowercase or unchanged keywords, set the indent, or switch to minify.

STEP 3

Copy or download

Copy the clean SQL with one click, or download it as a .sql file. Nothing leaves your device.