SQL Formatter
Free online SQL formatter and beautifier. Formats SELECT, INSERT, UPDATE, DELETE, and more. Uppercases keywords, adds proper indentation, and puts each clause on its own line — all in your browser.
Indent
SQL Input
Paste SQL above to format it.
How to Use
Paste your SQL
Paste any raw or minified SQL query into the input box. Formatting is applied automatically as you type.
Adjust options
Set the indent size (2 or 4 spaces) and choose whether to uppercase SQL keywords like SELECT, FROM, WHERE.
Copy the result
Click Copy to copy the formatted SQL. Paste it into your editor, query tool, or documentation.