Skip to content
OT

SQL Formatter

Free No sign-up Nothing stored

Turn a long SQL query into clean, readable lines.

Output

How to use

  1. 1 Paste one or more SQL queries into the Input box.
  2. 2 Choose how keywords like SELECT and WHERE should look, and the indent size.
  3. 3 Press Format, then Copy the result.

Example

Input

select id, name from users where active = 1 order by name

Output

SELECT id,
       name
FROM users
WHERE active = 1
ORDER BY name

Related tools