SQL Formatter & Beautifier
Paste a SQL query and instantly format it with proper indentation, keyword capitalisation, and clause-based line breaks.
Indent:
SELECT u.id,u.name,u.email,o.total
FROM users u
LEFT JOIN orders o
ON u.id=o.user_id
WHERE u.active=1 AND o.total>100
ORDER BY o.total DESC
LIMIT 50;Frequently Asked Questions
Which SQL dialects does this formatter support?
It supports standard SQL keywords and works with MySQL, PostgreSQL, SQLite, and SQL Server queries. Dialect-specific syntax is preserved as-is.
Does it validate SQL syntax?
No — it formats and beautifies the SQL structure without parsing it. Syntax validation requires a database engine.
Can I choose the indentation style?
Yes. You can choose 2 spaces, 4 spaces, or tab indentation.
Is my SQL query sent to a server?
No. All formatting runs in your browser — your queries never leave your device.