Runs in your browser
SQL Formatter
Format SQL — SELECT, JOIN, subqueries, GROUP BY, aliases, and more — into readable, consistently indented queries. Choose the dialect that matches your database (Standard SQL, MySQL, PostgreSQL, SQLite, MariaDB, SQL Server, BigQuery, or Snowflake) for dialect-aware formatting.
ReadyCode FormattersFree · No account required
Related tools
Features
- 8 real dialects: Standard SQL, MySQL, MariaDB, PostgreSQL, SQLite, SQL Server, BigQuery, Snowflake
- Formats joins, subqueries, GROUP BY/HAVING, and aliases
- Consistent uppercase keyword style
How to use
- Paste a SQL query into the input.
- Choose the dialect that matches your database.
- Click Format, then copy or download the result.
Example
Example
SELECT id, name FROM users WHERE active = 1 ORDER BY name ↓ SELECT id, name FROM users WHERE active = 1 ORDER BY name
FAQ
- Which SQL dialects are actually supported?
- Standard SQL, MySQL, MariaDB, PostgreSQL, SQLite, SQL Server (T-SQL), BigQuery, and Snowflake — each backed by the formatter's own dialect-specific parser, not a generic guess.
- Does it handle subqueries and joins?
- Yes, including nested subqueries, all join types, GROUP BY/HAVING, and column or table aliases.