SQL Formatter

Indent common SQL clauses for readability.

Processed on your device. Your files and text are not uploaded.

Basic clause formatting; quoted literals and comments are preserved. It does not validate SQL or understand every dialect.

How to use

Paste your input, choose an operation, then copy or download the result.

When to use SQL Formatter

Separate common SQL clauses when reviewing a short query. The formatter preserves quoted literals and comments and adds line breaks before recognized clauses.

Practical example

select name from customers where city = 'Mumbai' becomes separate SELECT, FROM and WHERE lines. The quoted city value stays unchanged.

Does formatting prove a query is valid?

No. This is a basic readability helper, not a database parser. It does not execute queries, check table names, or support every SQL dialect. Test the result against your database before use.

Related tools