SQL Formatter
Developer ToolsBeautify or minify SQL queries
FreePrivateInstant
Similar tools you may like
History
All history →SQL Formatter — at a glance
Turn a long, messy SQL query into neat, readable code — or squeeze it into one line.
select a,b from t where x=1
Run
SELECT
a,
b
FROM t
WHERE x=1
How to use it — step by step
A SQL query (SELECT, INSERT, UPDATE, DELETE and more).
1
Paste your input
Paste or type your content into the big input box.
2
Choose options
Pick the mode and options that fit what you need.
3
Format SQL
Press the button. The result is created instantly on your device.
4
Copy the result
Check the output and press Copy to use it anywhere.
Pro tips
Small things that make the result better.
✦Uppercase keywords make queries easier to scan.
✦Strings and quoted names are never changed.
✦Minify when you need a query on one line for logs or config.
Quick facts
Beautifyor minify
Keywordsauto uppercase
Strings safenever altered
Freeno signup
Frequently Asked Questions
Does it change how my query runs?+
No. Only spacing, line breaks and keyword case change — the logic stays identical.
Which databases are supported?+
It works for standard SQL used by MySQL, PostgreSQL, SQL Server and SQLite.
Are comments kept?+
Comments are removed to keep the output clean.
Is my data safe?+
Yes. Everything runs inside your own browser. Your text, files and images are never uploaded to any server.
More Free Tools
Guides you might like
All guides →JSON FormatterWhy your JSON will not parse, and how to find the bad commaRobots.txt Generatorrobots.txt explained: Allow, Disallow, wildcards and the mistakes that block your siteChmod Calculatorchmod permissions explained: what 755, 644 and 777 actually meanSitemap XML Generatorsitemap.xml explained: what to include, the 50,000 URL limit and HTML sitemaps

