SQL Formatter
Make SQL queries readable: uppercase keywords and line breaks.
Also called: SQL beautifier, SQL pretty print.
DEVELOPER
Runs locally in your browserSQL Formatter
Make SQL queries readable: uppercase keywords and line breaks.
Ready. Fill in the fields above, then press Run tool.
Privacy note: this tool runs in your browser, so the text you enter stays on your device.
Watch: how to use the SQL Formatter (12 seconds)
Recorded on a phone, steps written on screen, no sound.
About the SQL Formatter
Make SQL queries readable: keywords in uppercase and clauses (SELECT, FROM, WHERE, JOIN, GROUP BY, ORDER BY) on new lines.
How to use the SQL Formatter
- Enter your textType or paste SQL query.
- Press Run toolThe result appears right under the button.
- Copy or download the resultCopy text results with Copy output; when the tool makes a picture or file, use its Download button.
This tool works inside your browser: what you enter stays on your device.
Example
A sample input and the result the SQL Formatter gives for it (produced by the tool itself, not typed by hand).
- SQL query
- select id, name from customers where city = 'Lahore' order by name
Result:
SELECT id, name FROM customers WHERE city = 'Lahore' ORDER BY name
Good to know
- What you need
- You type or choose: SQL query
- Where it runs
- In your browser, on your device.
- Cost
- Free, no sign-up.
Questions
Does it check my SQL?
No, it only formats it.
Which databases?
Standard SQL; it works for MySQL, PostgreSQL, SQL Server and SQLite queries.