Flowfiles ← All tools

Beautify · Indent · Minify · Uppercase keywords · No upload

SQL Formatter & Beautifier

Paste a cramped or one-line SQL query and get it back cleanly indented: every clause on its own line, JOINs and conditions aligned, keywords cased the way you like. Switch to minify to collapse a query to a single line, choose 2-space, 4-space or tab indentation, pick uppercase or lowercase keywords, and set trailing or leading commas. Works with MySQL, PostgreSQL, SQL Server and standard SQL — everything runs in your browser, nothing is uploaded.

Mode
Indent
Keywords
Options
Input SQL
Formatted SQL
Waiting for input
Ready

Key features

Clause-aware indenting

SELECT columns, FROM tables, JOIN/ON pairs, WHERE conditions, GROUP BY and ORDER BY each break onto aligned lines for instant readability.

Keyword casing

Force keywords to UPPERCASE, lowercase or Capitalized in one click while your identifiers keep the case you typed.

Minify to one line

Collapse a multi-line query into a single compact statement for logs, scripts and config strings without breaking strings or comments.

Private & offline

Queries are parsed locally in JavaScript. Nothing is uploaded, so schema names and data stay on your machine, even offline.

Frequently asked questions

How do I beautify a messy SQL query?

Paste the query and keep the Format tab selected. The tool tokenises the SQL and rebuilds it with each clause on its own line and nested sub-queries indented, so a wall of text becomes a structured statement you can read top to bottom.

Can it uppercase keywords but leave my columns alone?

Yes. The Keywords option only touches reserved words such as select, from, join, where and data types. Your table and column names are never recased, so userId stays userId.

Does it support MySQL, PostgreSQL and SQL Server?

It does. The tokeniser understands backtick identifiers (MySQL), double-quoted identifiers and :: casts (PostgreSQL), and bracket identifiers (SQL Server / T-SQL), plus standard ANSI SQL, so queries from any of these format cleanly.

What do leading commas do?

With Leading commas enabled, each column after the first starts with a comma instead of ending with one. This style makes it easy to comment out or reorder columns and keeps diffs small in version control.

Is my SQL uploaded anywhere?

No. Formatting runs entirely in your browser with JavaScript. The query never leaves your device and the page keeps working with no network connection once loaded.

SQL guides