SQL Formatter
Paste SQL to format and beautify with proper indentation and keyword uppercasing. Runs entirely in your browser.
About SQL Formatter
This free online SQL formatter beautifies your SQL queries with proper indentation, keyword uppercasing, and clause separation. It supports all major SQL statement types and runs entirely in your browser.
Supported SQL Statements
- SELECT queries with JOINs, subqueries, and aggregations
- INSERT INTO statements
- UPDATE with SET and WHERE clauses
- DELETE FROM statements
- CREATE TABLE with column definitions and constraints
- UNION, INTERSECT, and EXCEPT operations
Formatting Rules
- SQL keywords are uppercased (SELECT, FROM, WHERE, etc.)
- Major clauses start on new lines
- JOINs are indented under the FROM clause
- AND/OR conditions are indented under WHERE
- Multiple columns and assignments are listed one per line