Format messy SQL with proper indentation and keyword capitalization.
Input SQL
Formatted SQL
Formatted SQL will appear here...
Three steps. Instant results.
Uses the sql-formatter library to parse and reformat SQL queries with proper indentation, keyword capitalization, and consistent spacing. Supports MySQL, PostgreSQL, SQLite, T-SQL, and BigQuery dialects. The formatter tokenizes your query, builds an Abstract Syntax Tree (AST), and outputs clean, readable SQL. Everything runs completely in your browser.