SQL Formatter
Format and beautify SQL queries
Input SQL
Loading...
Output
Loading...
Use these tools directly in Chrome
Install the DailyDevTools extension — access all tools from your browser toolbar
What is SQL Formatter?
Raw SQL queries pasted from logs, APIs, or ORMs are often a single unreadable line. DailyDevTools' SQL Formatter applies consistent indentation, capitalization, and newlines to make complex queries readable in seconds. It supports multiple SQL dialects including PostgreSQL, MySQL, SQLite, Microsoft SQL Server, and BigQuery, and can minify SQL for production use or copy queries for documentation.
How to use SQL Formatter
- 1Paste your SQL query — minified, logged, or raw — into the input panel
- 2Select your SQL dialect from the dropdown (PostgreSQL, MySQL, SQLite, etc.)
- 3Click Format to apply indentation and capitalization, or Minify to compress the query
- 4Use Copy to copy the formatted query or Download to save it as a .sql file