uuutil ← all tools

SQL formatter

Paste SQL and read it formatted: choose the dialect — standard SQL, PostgreSQL, MySQL or SQLite — the indent width and the keyword case (UPPER, lower, or as written), or flip to minify mode to collapse the statement to one line with string literals untouched and line comments converted to block comments so nothing is swallowed. Formatting is a text-only transformation: nothing is executed and nothing is validated beyond what the formatter itself reports — parse errors name the line and column. Formatting is the bundled sql-formatter library, named with version and license in the ledger below.

Privacy ledger

Data acquired None.
Libraries used Lit 3 and sql-formatter 15.8.2 (MIT) — both bundled into the tool file itself.
Data stored None.
Data transmitted None.

Use it on your own page

Download the tool as a single self-contained HTML file: readable source with the Lit library included, zero network requests — it works opened straight from your disk, and you can customize everything.

Prefer the hosted widget? One script tag embeds it and stays up to date:

<script type="module" src="https://uuutil.com/tools/sql-formatter.js"></script>
<uu-sql-formatter lang="en"></uu-sql-formatter>

Source license: MIT — free to use, modify and redistribute; keep the license notice in copies.