SQL Formatter

Make SQL queries readable: uppercase keywords and line breaks.

Also called: SQL beautifier, SQL pretty print.

FreeNo sign-upRuns in your browser
DEVELOPER

SQL Formatter

Make SQL queries readable: uppercase keywords and line breaks.

Runs locally in your browser
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.

Find a tool

Loading tools…

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

  1. Enter your textType or paste SQL query.
  2. Press Run toolThe result appears right under the button.
  3. 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.

More tools in Developer

See all Developer tools