SQL Formatter
Format a SQL query: indentation, line breaks, keyword case. Multiple dialects supported.
The SQL formatter turns a long, indent-free query into readable, neatly structured code: each keyword (SELECT, FROM, WHERE, JOIN, GROUP BY) starts on its own line, nested conditions get indented, and the list of fields and conditions lines up in a column.
This is especially useful for queries copied from logs, ORM debug output, or someone else's code, where everything is squashed onto one line. A formatted query is much easier to read and check for mistakes.
The tool supports several SQL dialects (MySQL, PostgreSQL, SQLite, MariaDB, T-SQL, BigQuery and standard SQL) and lets you choose upper or lower case for keywords. Everything runs in your browser — the query is never sent to a server.