SQL Formatter & Beautifier

Paste SQL and it is laid out instantly, one clause per line.

Your text and files never leave your browser — nothing is sent to a server.

How to use

  1. Paste SQL and the result appears right away, with each clause (SELECT, FROM, WHERE, JOIN…) on its own line.
  2. Choose your database under “Dialect” so identifiers such as `backticks` or [brackets] and vendor-specific syntax are read correctly.
  3. Use “Keyword case” to make keywords, function names and data types like SELECT, COUNT and VARCHAR upper or lower case. Table and column names are not changed.
  4. Multiple statements separated by semicolons are formatted together, with a blank line between them.

FAQ

Does it check my SQL for errors?

It reads the query only as far as needed for formatting, so it reports places it cannot read, such as an unclosed quote. It does not verify that tables or columns exist or that the syntax is fully valid. For MySQL, try the MySQL Syntax Checker.

Will it change my query?

Only line breaks, indentation and keyword case change. Quoted values and table or column names are left untouched, and comments are kept.

Is my query sent anywhere?

No. Formatting happens entirely in your browser — nothing is sent to a database or any server.

Related tools

All tools