SQL Formatter
Format your SQL queries with customizable options for better readability and maintainability.
Formatting Options
Consistent Indentation
Use consistent indentation to make your queries easier to read and maintain.
Keyword Capitalization
Capitalizing SQL keywords helps distinguish them from table and column names.
Line Breaks
Place each major clause (SELECT, FROM, WHERE, etc.) on a new line for better readability.
Commenting
Add comments to explain complex queries or business logic using -- or /* */.
SQL Style Guides
Many organizations have their own SQL style guides. Some popular ones include:
- Kickstarter SQL Style Guide
- Mozilla SQL Style Guide
- GitLab SQL Style Guide
Features
Support for Standard SQL, MySQL, PostgreSQL, SQLite, SQL Server, and Oracle syntax.
Adjust indent size, keyword capitalization, and spacing between queries to match your preferences.
Automatically handles nested queries, parentheses, and complex SQL structures with proper indentation.