SQL Minifier
Strip comments and collapse whitespace to shrink a SQL query down to a single compact line, without changing its logic.
Input SQL
Minified SQL
SELECT id, name, email FROM users WHERE active = true AND created_at > '2025-01-01' ORDER BY created_at DESC LIMIT 20;
Strips comments and collapses whitespace onto one line — doesn't rename identifiers or change query logic.
Example input
SELECT *\nFROM users;
Example output
SELECT * FROM users;