SQL Formatter
Format and beautify SQL queries with syntax highlighting
SQL Input
Formatted SQL
How to use SQL Formatter
- 1
Paste a SQL query — single-line, minified, or messily indented all work.
- 2
The formatter reflows it with consistent indentation, keyword casing, and line breaks around clauses like SELECT, FROM, WHERE, and JOIN.
- 3
Copy the formatted query back into your editor, migration file, or code review comment.
Common use cases
- •Making a long query readable before pasting it into a pull request or Slack message
- •Standardizing SQL style across a team without a linter set up locally
- •Untangling a query that was generated by an ORM or copied from logs