Donk Tools

SQL Formatter

Input

Format Options

Output

Enter SQL above to see it formatted automatically.

About

This formatter supports standard SQL syntax. It recognizes common keywords across MySQL, PostgreSQL, SQLite, and SQL Server. For dialect-specific syntax (e.g., LIMIT vs TOP, window functions, CTEs), keywords are recognized and formatted, but the formatter does not validate your SQL. Always test formatted output with your target database.