SQL Formatter

Format SQL queries with line breaks and uppercase keywords for readability. Paste SELECT, INSERT, UPDATE, or CREATE statements and get clean, review-ready SQL.


Output will appear here.

Frequently Asked Questions

What SQL dialects are supported?

Generic SQL formatting — works with MySQL, PostgreSQL, SQLite, and standard ANSI-style queries.

Does this validate SQL?

No. It formats text for readability without checking syntax against a specific database engine.

Will it change query logic?

No. Only whitespace and keyword line breaks change. Review formatted output before running in production.

Can I format long queries?

Yes. Paste multi-line or minified queries — output updates live.

Is this tool free and does it work on mobile?

Yes on both counts. The SQL Formatter on draft21 is completely free with no sign-up required and works on all devices.