SQL Formatter

Paste a messy one-line query and get readable, consistently indented SQL as you type.

Updates instantly as you type

01 / Fast steps

  1. Paste your SQL query.
  2. The formatted query appears as you type.
  3. Copy the result or download it as a .sql file.

02 / Best for

  • Make queries copied from logs and ORMs readable.
  • Clean up SQL before code review or documentation.
  • Untangle long queries with nested joins and subqueries.

03 / Why here

  • Keywords are uppercased and clauses indented consistently, following common style conventions.
  • Runs entirely in your browser, so queries with table names and business logic never leave your device.

04 / Keep in mind

  • Formatting follows standard SQL: some vendor-specific syntax may be spaced generically.
  • The formatter does not validate the query or check that it runs.

faq

Questions, answered.

01Which SQL dialects are supported?

Standard SQL formatting covers the common ground of PostgreSQL, MySQL, SQL Server and SQLite queries. Vendor-specific extensions are kept intact and spaced generically.

02Is my query sent to a server?

No. Formatting happens locally in your browser, so queries revealing your schema or business logic never leave your device.

03Is SQL Formatter free to use?

Yes, SQL Formatter is completely free, with no sign-up and no usage limits. It runs entirely in your browser, so your data never leaves your device.