SQL Formatter

Turn dense one-line SQL into a readable, properly indented query.

How to use

  1. Paste your SQL query.
  2. Click Format.
  3. Copy the readable version.

Examples

One-liner to readable
Input: select id,name from users where active=1 order by name
Output: SELECT id, name FROM users WHERE active = 1 ORDER BY name

Frequently asked questions

Which SQL dialect?

Standard SQL. Most dialect-specific syntax still formats, but exotic procedural blocks may not.

Related tools