PRAVIDHI
Back to Tools
SQL Formatter
Format, validate, and beautify SQL queries
Example Queries
Simple SELECT
JOIN Query
INSERT Statement
Input SQL
Clear
Formatted SQL
Format SQL
Uppercase Keywords
Indent:
2 spaces
4 spaces
SQL Formatting Tips
• Always use uppercase for SQL keywords (SELECT, FROM, WHERE, etc.)
• Indent subqueries and JOIN conditions for readability
• Each major clause (SELECT, FROM, WHERE) on new line
• Use aliases (AS) for table and column names
• Add comments with -- for single line or /* */ for multi-line