Fork me on GitHub

Mini HTML Minifier


Golfed by xem
Found a bug? Want a new feature? open an issue
Nothing to minify? Try it with my test file or Apple.com's homepage!



Simple compression (120 bytes)

<textarea oninput='for(i=9;i--;)value=value.replace(/<\/[tl].>\s*|[\s/]*(^|$|>)\s*|(\s)\s|<\/p>\s*(?=<p>|$)/gi,"$1$2")'>



More compression (128 bytes)

<textarea oninput='for(i=9;i--;)value=value.replace(/<!.*?->|<\/[tl].>\s*|[\s/]*(^|$|>)\s*|(\s)\s|<\/p>\s*(?=<p>|$)/gi,"$1$2")'>