tools/format/sql formatter
// formatnew

sql formatter

reformat any sql dialect cleanly

drag & drop · up to 5 MB (Pro: 100 MB)
— paste sql to start // client-only
// output appears here

// about this tool

A SQL formatter rewrites raw or minified SQL into consistently indented, keyword-uppercased statements. It breaks long queries into readable clauses — SELECT columns on separate lines, WHERE conditions aligned, JOIN chains clearly separated — making it easier to review query logic and spot mistakes.

// when to use

  • Prettify a minified SQL query copied from application logs
  • Normalize SQL from different developers to a consistent style before code review
  • Quickly read a complex multi-join query by expanding it into readable form
  • Minify SQL for embedding in config files or environment variables

// faq

Which SQL dialects are supported?
The formatter handles standard SQL and most common dialects — MySQL, PostgreSQL, SQLite, SQL Server, and Oracle. Dialect-specific syntax like LIMIT/TOP, backtick identifiers, and square bracket quoting is all preserved correctly.
Is my query sent to a server?
No. All formatting happens entirely in your browser using a client-side parser. Nothing leaves your tab.
// history
Pro Cloud Sync — upgrade
no operations yet