Format SQL for PostgreSQL, MySQL, and SQLite

PostgreSQL formatting keeps dollar-quoted strings, :: casts, ON CONFLICT, FILTER, INCLUDE indexes, and JSON or array operators.

PostgreSQL, MySQL, and SQLite disagree on quoting, operators, and statement forms. A generic formatter can break dollar quotes, backticks, or vendor clauses. Pick the dialect that matches the database the SQL will run on.

This tool formats PostgreSQL, MySQL, and SQLite. It does not convert SQL from one dialect to another, execute queries, or check them against a schema.

Formatting changes whitespace and keyword case so the SQL is easier to read. It does not rewrite joins, add indexes, or prove that a statement is fast or valid for your schema.

Formatting runs in your browser. Query text is not posted to a server, written to local storage, or included in analytics events.

Guides and articles on the blog for PostgreSQL, MySQL, SQLite.