SQL formatter
Format SQL for PostgreSQL, MySQL and SQLite.
How it works & limits
How to use this tool
Format SQL for PostgreSQL, MySQL and SQLite.
Paste or enter your content. The result updates as you type. Choose an option only when you need to change the default.
Example input
select u.id,u.name,count(o.id) as orders from users u left join orders o on u.id=o.user_id where u.active=true group by u.id,u.name order by orders desc;
Local processing
Your input stays in this browser. Drafts are kept in page memory while switching tools, and disappear on reload.
Text is limited to 1 million characters. Regex runs in a worker, capped at 200,000 characters, 1,000 matches and 1.5 seconds. Inputs above 100,000 characters use manual refresh.
The first page load and on-demand modules require network access. A complete offline cache is not included.