Data

SQL Formatter, Minifier & Beautifier

Format or minify SQL for MySQL, PostgreSQL, SQLite, and SQL Server with configurable keyword case. Runs locally.

Browser-local
Local workspaceInput never leaves this tab
SQL and MyBatis XML — formatted, never executed
0
Formatted SQLReady

SQL text is formatted entirely in the browser. The tool never connects to a database or executes the query.

About this tool

What SQL Formatter does

Readable SQL makes joins, filters, grouping, and nested expressions easier to review. The formatter tokenizes common SQL syntax while preserving quoted strings and comments, and can also create a compact transport-friendly form.

Common uses

  • Beautify SQL copied from logs
  • Normalize keyword case for reviews
  • Minify a query for configuration or debugging

Privacy and limitations

SQL text is formatted entirely in the browser. The tool never connects to a database or executes the query.

Validate important output in the actual language, database, or target platform.

Frequently asked questions

Does this execute SQL?

No. It only transforms text and cannot connect to a database.

Are all dialect features supported?

Common MySQL, PostgreSQL, SQLite, and SQL Server statements are formatted. Vendor-specific procedural syntax may need the database vendor's formatter.

Can formatting change query behavior?

The formatter preserves tokens and quoted content, but important production SQL should always be reviewed and tested against the target database.