$ loading▍
$ loading▍
Turn a one-line query into clean, readable SQL, for MySQL, PostgreSQL, SQLite, SQL Server and a dozen more dialects. Pick your style, or minify it back.
Options
Your SQL
Formatted
MySQL backticks, PostgreSQL :: casts, T-SQL brackets and BigQuery structs are all understood, not mangled.
Uppercase or lowercase keywords, 2 or 4 spaces or tabs, and blank lines between statements. Or squash it all onto one line.
Formatting runs in your browser, so table names and data in your queries never touch a server.
// faq
Standard SQL, MySQL, MariaDB, PostgreSQL, SQLite, SQL Server (T-SQL), Oracle PL/SQL, BigQuery, Snowflake, Redshift, Spark, DuckDB, Hive, ClickHouse, Db2, N1QL, Trino and TiDB, through the open-source sql-formatter library.
No. Only whitespace and, if you choose, the case of keywords change. Identifiers, strings and comments are kept as written. Minify also removes comments.
Usually the dialect doesn't match the syntax (for example backtick identifiers under PostgreSQL) or the query has an unclosed quote or bracket. Try the matching dialect first; the error shows where parsing stopped.
Yes. Nothing is uploaded. A share link does contain the query, so only share it when you mean to.
Looking for something bigger? The products are full apps: an encrypted password vault, self-hosted CI/CD, and more.