SQL Formatter

Format and beautify SQL queries

Dialect:
Input SQL
Formatted SQL

About SQL Formatter

1What is it?

Format and beautify SQL queries. Standardize keywords to uppercase, add proper indentation, and make complex queries readable. Supports various SQL dialects.

2Use Cases

  • Format complex database queries for review
  • Standardize SQL style in a team
  • Debug long generated queries
  • Improve readability of stored procedures

3Examples

Format SQL

Input

select * from users where id=1

Output

SELECT
  *
FROM
  users
WHERE
  id = 1

?Frequently Asked Questions

Which SQL dialects are supported?

We support standard SQL as well as common dialects like MySQL, PostgreSQL, and SQL Server.