Format SQL
Beautify and format your SQL queries with proper indentation, uppercase keywords, and clean layout. All processing happens in your browser.
SQL Formatter
Paste any SQL query to format it with proper indentation and optional uppercase keywords.
No formatting yet
Enter some SQL above and click Format to see your formatted query with clean indentation and structure.
What this tool does not do
- Does not validate or execute SQL queries.
- May not support all vendor-specific syntax perfectly.
- Does not fix syntax errors or optimize queries.
How It Works
Paste your SQL
Enter or paste any SQL query into the input area.
Toggle options & Format
Choose uppercase keywords and click Format to beautify the SQL.
Copy the result
Copy the formatted SQL to your clipboard or download it as a file.
Frequently Asked Questions
What SQL dialects are supported?
The formatter supports standard SQL syntax including MySQL, PostgreSQL, SQLite, and SQL Server common keywords and structures.
Does it format subqueries?
Yes. The formatter handles nested subqueries and indents them properly based on their nesting level.
Is my SQL query uploaded to a server?
No. All processing happens entirely in your browser. Your queries never leave your device.