What is SQL Formatter?
Readable SQL is easier to review, maintain and debug. This formatter recognizes common SQL constructs and supports dialect-specific formatting for PostgreSQL, MySQL, SQLite, SQL Server, Oracle PL/SQL and standard SQL. It only formats text; it does not execute queries, verify schema compatibility, or optimize query plans.
How to use this tool
- Paste SQL into the editor and choose the relevant dialect.
- Choose indentation and keyword casing, then format.
- Copy the formatted query or download it as a .sql file.
Example
select id,name from users where active=1; → SELECT id, name FROM users WHERE active = 1;