SQL Formatter

Format and indent SQL queries for readability.

Support
Works Offline
Privacy First
No Login
No API

About the SQL Formatter

Format SQL with grammar-aware rules for MySQL, PostgreSQL, SQLite, SQL Server, Oracle PL/SQL, BigQuery, Snowflake, Redshift, Spark SQL, DuckDB, and more. Choose indentation and keyword casing, then copy or download the result.

Popular uses

  • sql formatter
  • sql beautifier
  • query formatter
  • sql indent
  • mysql formatter
  • postgresql formatter

Examples

Format SELECT

SQLselect id,name from users where active=1

Output

SQLSELECT id,
  name
FROM users
WHERE active=1

Keyboard shortcuts

  • Copy the main outputCtrl / ⌘ + Shift + C
  • Download the resultCtrl / ⌘ + S
  • Share this toolCtrl / ⌘ + Shift + S
  • Reset the inputsAlt + R
  • Open the tool search paletteCtrl / ⌘ + K

Related tools

Works well with

Next steps from other categories.

All Dev Utilities tools

Frequently asked questions

Read more

Version 2.0.0 · Updated 2026-09-16 · Runs entirely in your browser