SQL Formatter
Format and beautify SQL queries with proper indentation and syntax highlighting. Support for multiple SQL dialects and formatting styles.
SQL Input
Enter SQL query to format or upload a file
Sample SQL:
SELECT u.id, u.name, u.email, p.title, p.content, c.name as category_name FROM users u LEFT JOIN posts p ON u.id = p.user_id LEFT JOIN categories c ON p.category_id = c.id WHERE u.active = 1 AND p.published = 1 ORDER BY u.name, p.created_at DESC;
Formatted SQL
Formatted SQL query with syntax highlighting
Beautify
• Proper indentation
• Keyword capitalization
• Line breaks
• Readable structure
Minify
• Remove whitespace
• Compact format
• Smaller size
• Production ready
Multi-Dialect
• MySQL support
• PostgreSQL support
• SQL Server support
• Oracle support
SQL Dialects
Support for different SQL database systems
MySQL:
Features: AUTO_INCREMENT, LIMIT
Syntax: Backticks for identifiers
Functions: CONCAT, DATE_FORMAT
PostgreSQL:
Features: SERIAL, LIMIT/OFFSET
Syntax: Double quotes for identifiers
Functions: || operator, EXTRACT
SQL Server:
Features: IDENTITY, TOP
Syntax: Square brackets for identifiers
Functions: GETDATE, LEN