Paste messy, single-line, or inconsistently indented SQL and get it back cleanly formatted — proper indentation, clause breaks, and consistent keyword casing.
Runs fully in your browser · nothing is sent anywhere
Indent
Keywords
input.sql
Waiting for input…0 chars
formatted.sql
Formatted SQL will appear here.
—
How it works
Formatting happens entirely client-side with a small hand-written tokenizer — no network request, no upload, no server round-trip.
Handles SELECT / INSERT / UPDATE / DELETE, JOINs, subqueries, CTEs (WITH), CASE expressions, comments, and multiple semicolon-separated statements.
This is a whitespace-and-structure formatter, not a SQL parser — it won't validate query correctness, only reformat what you paste.