Paste SQL and auto-format with proper indentation, keyword uppercasing, and consistent style. Copy the beautified result instantly.
A SQL formatter restructures SQL queries with consistent indentation, keyword capitalization, and line breaks for improved readability and maintainability.
SELECT u.id, u.name, u.email, o.total FROM users u JOIN orders o ON u.id = o.user_id WHERE o.total > 100 AND u.active = true ORDER BY o.total DESC LIMIT 10
Formula
Formatted SQL = Uppercase(Keywords) + Newlines(Clauses) + Indent(Sub-clauses)Keywords = SQL reserved words like SELECT, FROM, WHERE, JOIN, etc.
Clauses = major SQL sections placed on separate lines
Sub-clauses = conditions and joins indented under their parent clause
Worked Example
Formatting a multi-table query
Did you know? SQL (Structured Query Language) was first developed at IBM in the 1970s under the name SEQUEL. It became an ANSI standard in 1986 and is now used by virtually every relational database system.
Sources
Convert text to ASCII codes and back. Supports decimal, hex, binary, and octal formats.
Convert width/height to aspect ratios, scale dimensions, and generate responsive embed CSS for any layout.
Calculate required internet bandwidth based on devices and activities in your household.
Encode and decode Base64 strings. Convert text for data URIs, APIs, and safe data transmission.
Create CSS border-radius with visual controls for each corner. Generate circles, pills, and custom shapes.
Create CSS box shadows with multiple layers, live preview, and copy-ready code.