SQL formatter

Input
Output

SQL Formatter

Paste a long query and get it back readable: each clause on its own line, joins and conditions indented, keywords in the case you like. It understands 16 dialects, so PostgreSQL casts, SQL Server brackets and BigQuery backticks stay intact.

How do I use the SQL formatter?

  1. Paste one or more SQL statements.
  2. Pick the dialect, the keyword case and the indent.
  3. Copy the formatted SQL or save it as a .sql file.

What does the SQL formatter do?

  • 16 dialects: PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle PL/SQL, BigQuery, Snowflake and more
  • UPPER, lower or unchanged keywords
  • 2 spaces, 4 spaces or tabs
  • Several statements at once
  • Errors with the line and column

Frequently asked questions

Is my code uploaded?
No. The formatter runs in your browser; your code stays on your device.
Why does it take a moment the first time?
The formatter loads only when you use it, and only the parts your language needs. After that your browser keeps it.

More JSON tools

Bracely has 97 JSON tools in one page. Related ones:

Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut · About · Privacy policy
Last updated · Version 5.4 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram