SQL Formatter

Free. No sign-up. Your input is processed in your browser.

Turn a one-line query into readable SQL.

How to use it

  1. Paste your query.
  2. Pick your database, keyword case and indent.
  3. Copy or download the formatted SQL.

Choose the right database

Dialects write names and parameters differently, such as [name] in SQL Server and backticks in MySQL. The matching choice helps the formatter read them correctly.

Limits

The formatter changes layout and, if you ask, keyword case. It does not check or run your query. Stored procedures and long procedural scripts may not format well, so compare the result before you use it.

Questions

Is my query sent to a database?

No. The editor does not connect to any database.

Does it find SQL errors?

Not reliably. It is a formatter, not a validator.

Related tools

See all tools