SQL Formatter
Format and beautify SQL queries with customizable indentation.
Input
Indent:2 spaces4 spacesTabKeywords:UPPERCASE
About SQL Formatter
This SQL formatter helps you quickly format and minify SQL queries. Paste your raw SQL into the input area and choose your preferred indentation style and keyword casing.
Format pretty-prints your SQL with each major clause on its own line and proper indentation for sub-clauses, columns, and nested parentheses. Minify collapses your query into a single compact line. Toggle keyword casing between UPPERCASE and lowercase to match your team's style.
Supports SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, JOINs, subqueries, CASE expressions, and more. All processing happens in your browser — your data never leaves your device.