SQL Formatter

Format and beautify SQL queries with uppercase keywords, clause-per-line layout and indented conditions.

How to use SQL Formatter

  1. Paste your SQL.
  2. Choose keyword case and indentation.
  3. Copy or download the formatted SQL.

Supported features and limitations

A lightweight formatter: it does not validate SQL or understand every dialect, and unusual syntax (procedures, vendor extensions) may format imperfectly. Strings and comments are kept as written.

Privacy

Everything you type is processed locally in your browser and is not sent to our servers. No account is needed and there is no watermark.

Frequently asked questions

Does it change what my query does?

It only changes whitespace and keyword case.

Does it work for MySQL and PostgreSQL?

Common SELECT, INSERT, UPDATE and DELETE statements work across dialects.

Related tools

More Developer & Webmaster Tools · All free tools