SQL Formatter
Format SQL queries for SQL, PostgreSQL, MySQL or SQLite. Control keyword case and indentation.
How to use
- Paste your input or load the example below.
- Adjust the options, then select “Format SQL”.
- Review the result, then copy or download it.
No uploads. No account. Processing stays in your browser.
Example input
select c.id,c.name,count(o.id) as order_count,sum(o.total) as revenue from customers c left join orders o on o.customer_id=c.id where o.status='paid' and o.created_at>='2026-01-01' group by c.id,c.name having sum(o.total)>100 order by revenue desc limit 20