Free Online SQL Formatter

Instantly format your SQL queries with proper indentation.

Format Styles

2 spacesStandard indentation, compact and readable
4 spacesWider indentation for extra clarity
TabUses tab characters for indentation
UPPER keywordsSELECT, FROM, WHERE in uppercase
lower keywordsselect, 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.

Related Tools

💡 Level up your code editing

JetBrains IDEs Partner

Professional IDEs with built-in formatters, linters, and refactoring tools.

🛠️ Get new free tools every week

Join 3-Tools newsletter — no spam, unsubscribe anytime.