SQL Formatter
Paste messy SQL and get a clean, indented, easy-to-review query.
Input SQL
Formatted SQL
select id, name, email FROM users u LEFT JOIN orders o ON o.user_id = u.id WHERE u.active = true AND o.total > 100 ORDER BY o.total desc LIMIT 20;
How to use SQL Formatter
- 1
Provide the input
Paste, type, or select the information requested by SQL Formatter.
- 2
Choose your options
Adjust the available settings for the output you need.
- 3
Run and review
Generate the result, check it for accuracy, then copy or download it if available.
About SQL Formatter
Paste messy SQL and get a clean, indented, easy-to-review query.
Use SQL Formatter when you need to format and beautify sql. Review the available options in the interface, process your input, and check the result before saving or copying it.
Related tools
All Developer ToolsHot
JSON Formatter
Format, validate & beautify JSON
Open toolHTML Formatter
Format & beautify HTML
Open toolColor Converter
Convert HEX, RGB, and HSL colors
Open toolUnix Timestamp Converter
Convert Unix timestamps and dates
Open toolHot
JWT Decoder
Decode JWT tokens client-side
Open toolBase64 Decoder
Decode Base64 back to text or files
Open tool