Unformatted → formatted
select id,name,email from users where active=1 and created_at>'2024-01-01' order by name limit 10
SELECT id, name, email FROM users WHERE active = 1 AND created_at > '2024-01-01' ORDER BY name LIMIT 10
Format and beautify SQL queries for MySQL, PostgreSQL, SQLite and more.
The result will appear here.
Was this tool useful?
SQL written under pressure — in a monitoring tool, copied from a log, auto-generated by an ORM — is almost always a single unreadable line. Formatting adds indentation and keyword casing that let you follow the logic at a glance.
The formatter supports nine SQL dialects: standard SQL, MySQL, PostgreSQL, SQLite, BigQuery, Transact-SQL (SQL Server), PL/SQL (Oracle), MariaDB, and more. Picking the right dialect ensures the correct reserved-word list is applied.
select id,name,email from users where active=1 and created_at>'2024-01-01' order by name limit 10
SELECT id, name, email FROM users WHERE active = 1 AND created_at > '2024-01-01' ORDER BY name LIMIT 10