SQL Formatter

Format and beautify SQL queries.

About the SQL Formatter

The SQL Formatter beautifies and standardizes SQL query syntax for improved readability. Paste any SQL statement — SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, or complex multi-join queries — and get properly indented, keyword-capitalized output instantly.

Well-formatted SQL is easier to read, review, and debug. Inconsistent indentation and random capitalization are common in SQL generated by ORMs, query builders, or copy-pasted from Stack Overflow. Standardizing formatting makes it easier to spot logical errors, understand join conditions, and perform code review.

This tool uses the sql-formatter library. All formatting runs locally in your browser — no SQL queries are sent to any server, making it safe to format queries containing table names, column names, or filter values from production databases.