HTML Pack

Shrinks an HTML page into a smaller HTML page that still opens in any browser, and unpacks a packed page back to the exact original bytes.

Drop HTML files here

Plain pages get packed. Pages packed by this tool get unpacked. Add a page together with its CSS, scripts and images, or a whole folder, to fold everything into one file.

Encoding inside the file
Compression

Files

No files yet. Choose or drop an .html file to pack it.
How the packed file works

The page is compressed with one of three methods. Context mixing predicts each bit from eight blended models (orders 0–6, words, a sparse context and a long-match model, mixed by two learned mixers and refined by an adaptive probability map); it is usually 10–17% smaller than xz -9e on HTML and JavaScript but unpacks at a few hundred KB per second. LZMA (the 7-Zip and xz method) lands within about 1% of xz -9e at Ultra and unpacks almost instantly. Deflate (the gzip method) is the fallback. The context-mixing model uses integer arithmetic only, so every browser engine reproduces its predictions exactly. The data is stored in an HTML comment, and followed by a 2 KB script that decompresses it and writes it into the document with document.write while the browser is still parsing. The original therefore goes through the browser’s normal parser: its scripts run in order, DOMContentLoaded and load fire, the doctype and quirks mode are kept, and attributes on <html> and <body> carry over. The loader removes its own nodes before writing, so the finished DOM matches the original.