SQL Formatter

Format and prettify SQL queries with proper indentation and keyword casing.

Options

Sample Queries

â„šī¸ About SQL Formatter

  • Formats SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, and more
  • Keyword casing helps enforce team-wide SQL style conventions
  • Works with most SQL dialects: MySQL, PostgreSQL, SQLite, SQL Server, Oracle
  • String literals and quoted identifiers are preserved as-is

How to use SQL Formatter

  1. 1
    Paste SQL — Enter or paste your SQL query, even if it's minified or messy.
  2. 2
    Set options — Choose keyword casing and indentation style.
  3. 3
    Click Format SQL — Formatted output appears with clause statistics.
  4. 4
    Copy or download — Use the formatted SQL in your project or documentation.

SQL Formatter runs entirely in your browser — your queries never leave your machine.