Free Online SQL Formatter
Instantly format your SQL queries with proper indentation.
Format Styles
| 2 spaces | Standard indentation, compact and readable |
| 4 spaces | Wider indentation for extra clarity |
| Tab | Uses tab characters for indentation |
| UPPER keywords | SELECT, FROM, WHERE in uppercase |
| lower keywords | select, from, where in lowercase |
About
This tool uses the sql-formatter library to properly format SQL queries with correct indentation, line breaks, and keyword casing.
Supports standard SQL, MySQL, PostgreSQL, MariaDB, and other SQL dialects. Perfect for developers, DBAs, and students working with databases.