SQL Minifier
Minify SQL queries online — remove comments and extra whitespace to shrink size, processed entirely in your browser.
Local processing
No login required
Upload & download support
LanguageFor SQL queries
SQLinput.sql
Minify options
⌘⏎Quick minify
InputEditable
1
2
3
4
5
6
7
8
Minified outputSQL valid1 lines · 199 B
1
select u.id, u.name, count(o.id) as order_count from users u left join orders o on o.user_id = u.id where u.active = 1 group by u.id, u.name having count(o.id) > 0 order by order_count desc limit 20;
Original size: 199 BMinified: 199 BSaved: 0 B (0.0%)Local processing in your browser · nothing uploaded
How It WorksSQL
Overview
Strips comments, extra whitespace, and line breaks from SQL queries without changing execution logic, shrinking size as much as possible — ideal for embedding in code, logs, or minifying migration scripts. All processing happens locally in your browser, so nothing ever leaves your device.
Use Cases
Minify queries embedded in application codeReduce the size of SQL script filesMinify database migration scriptsShorten queries pasted into logs or tickets
Steps
123
Paste or uploadChoose a dialectGet the result