Online SQL Formatter

Format and beautify your SQL queries with proper indentation, keyword casing, and syntax highlighting. Supports SELECT, INSERT, UPDATE, DELETE, and complex queries.

Input SQL Query
Paste your SQL query below to format it
Formatted SQL
Your beautifully formatted SQL query

Your formatted SQL will appear here

SQL Formatter Features

Smart Formatting

Automatically formats SQL with proper indentation, line breaks, and keyword casing.

Customizable Options

Choose indentation level and keyword case (UPPER, lower, Title) to match your style.

Multiple SQL Types

Supports SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, and complex queries.

How to Use the SQL Formatter
1

Paste Your SQL

Copy and paste your SQL query into the input area. It can be unformatted or messy.

2

Choose Formatting Options

Select your preferred indentation (2, 4, or 8 spaces) and keyword case style.

3

Format & Copy

Click "Format SQL" to beautify your query, then copy or download the result.