WerklyTools
EN
Buy me a coffee

SQL formatter

Turn a one-line SQL query into clear code with every clause in its place. Choose the dialect, indentation and keyword style. Everything in your browser.

Processed 100% in your browser

Output

Ctrl + Enter runCtrl + C copy result

How to use

  1. 1Paste your SQL query.
  2. 2Pick your database dialect.
  3. 3Adjust keyword casing and indentation.
  4. 4Copy or download the result, or switch to Minify for a single line.

Use cases

  • Understand long queries copied from logs or ORMs.
  • Standardize query style across a team.
  • Prepare readable SQL for documentation or reviews.
  • Minify a query to paste into a command line.

Frequently asked questions

Which dialects are supported?

Standard SQL, PostgreSQL, MySQL, MariaDB, SQLite, SQL Server (T-SQL), Oracle (PL/SQL) and BigQuery.

Does it change what my query does?

No. It only changes whitespace, line breaks and, if you choose, keyword capitalization.

Is my SQL sent to a server?

No. Formatting runs in your browser, so you can paste sensitive queries safely.

What does Minify do?

It removes comments and extra whitespace to put the query on one line.

Related tools