SQL Formatter beautifies SQL queries with proper indentation, keyword formatting, and dialect-aware syntax handling. Supports Standard SQL, PostgreSQL, MySQL, and SQLite.
Paste any SQL query — from simple SELECTs to complex multi-table JOINs with subqueries — and get clean, readable output instantly. Configure keyword casing (UPPER, lower, or as-is) and indentation (2 or 4 spaces) to match your team's style guide.
Key features: 4 SQL dialect modes, configurable keyword casing, adjustable indentation, support for complex queries (JOINs, CTEs, subqueries, window functions), one-click copy, and download.
All formatting runs locally in your browser using the sql-formatter library. Your queries are never sent to any server — safe for formatting production SQL containing table names, column names, or sensitive query patterns.
We use cookies for anonymous analytics and ads. Your tool data never leaves your browser.