SQL Formatter

Beautify and format SQL queries with proper indentation and syntax highlighting.

Advertisement
Input SQL
Formatted SQL (highlighted)
Advertisement

About SQL Formatting

Well-formatted SQL is easier to read, debug, and maintain. This formatter capitalizes SQL keywords (SELECT, FROM, WHERE, etc.) and adds consistent indentation to nested clauses, subqueries, and JOINs.

Supported dialects include MySQL, PostgreSQL, and SQLite — the formatter recognizes dialect-specific keywords for each.