Free tool
Text compression test
Paste any text. Your browser compresses it with gzip and with a small predictive model, and shows which characters cost the most bits. The best compressors, such as the Transformer compressor tufazip, use the same principle with a much larger model. Your text stays in your browser. We do not send it or store it.
Your text, bits per character
Uncompressed text uses 8 bits per character. Fewer is better.
enwik9 (1 GB of Wikipedia), bits per character
From the Large Text Compression Benchmark, updated 2026-11-19. A 1 GB file gives a model far more to learn from than a short text, so compare the shape, not the numbers.
Where the bits go
0 bits 8+ bitsEach character is tinted by its cost under the context-mixing model. Hover a character to see its cost. The start of a word costs the most, and the end of a common word costs almost nothing.
At its average speed on enwik9, tufazip would take about to decode this text, on 2 NVIDIA B200 GPUs. The context-mixing model on this page took in your browser.
Why a better prediction gives a smaller file
A compressor of this kind has two parts. A model reads the text so far and gives a probability for each possible next symbol. An arithmetic coder then writes the real next symbol with −log2(p) bits, where p is the probability that the model gave it. A symbol that the model expected with a probability of 1/2 costs 1 bit. A symbol that it expected with a probability of 1/256 costs 8 bits. So the size of the file is the total surprise of the model, and a model that predicts better makes a smaller file.
The decoder runs the same model. It sees the same text in the same order, so it makes the same predictions, and it can read the bits back into symbols. The model itself does not need to go into the file.
How tufazip works
tufazip is a lossless compressor by Tommy He at Tufa Labs, published on 2026-10-14. It splits the text into tokens from a vocabulary of 4K words. A 12-layer Transformer with 163M parameters predicts each next token, and an arithmetic coder writes it.
The model learns while it compresses. The encoder and the decoder start from the same weights and make the same updates in the same order. So the weights that it learns never go into the file. In version 2, the model starts from a 34M-parameter model that was trained in advance. That model is quantized to 4.33 MB and ships with the decoder. Each update must be fully deterministic. If one floating-point result were different on the decoder, every later prediction would be wrong.
That is about 1,549 bytes per second. gzip decodes hundreds of megabytes per second. The best results on this benchmark come from models that learn, and they are slow. We cannot run tufazip on this site, because we have no GPUs. The model on this page is far simpler: it counts contexts and has no neural network. It shows the same principle.
enwik9 results
| Compressor | Method | enwik9 bytes | Bits/char | Ratio |
|---|---|---|---|---|
| gzip -9 | LZ77 with Huffman codes (1992) | 322,591,995 | 2.581 | 3.1x |
| bzip2 -9 | Burrows-Wheeler transform | 253,977,839 | 2.032 | 3.9x |
| zstd -22 --ultra | LZ77 with a large window | 215,674,670 | 1.725 | 4.6x |
| xz -9e | LZMA with a 1 GiB dictionary | 197,331,816 | 1.579 | 5.1x |
| paq8px | Context mixing of hundreds of models | 124,696,410 | 0.998 | 8.0x |
| cmix v21 | Context mixing plus an LSTM | 107,963,380 | 0.864 | 9.3x |
| nncp v3.2 | Transformer trained while it reads | 106,632,363 | 0.853 | 9.4x |
| tufazip v2 | Transformer with a trained prior | 100,958,324 | 0.808 | 9.9x |
| fx2-cmix-transformer | cmix with a Transformer model | 96,996,198 | 0.776 | 10.3x |
A selection from the Large Text Compression Benchmark (updated 2026-11-19, checked 2026-11-23). The benchmark ranks by the compressed size plus the size of the decompressor, and the full table has more entries. tufazip figures are from its README and write-up.
Prediction is also what a language model does. If you want next-token prediction for your own app, the DreamPrompting API gives free access to open models through an OpenAI-compatible endpoint.
A compressor and a weather forecaster do the same job. Each one looks at what has happened so far and says what is likely to happen next. The forecaster is judged by the rain. The compressor is judged by the size of its output, and the size is a direct measure of how surprised it was. Read this sentence slowly and notice how often you know the next letter before you see it. After "the compressor is judged by the size of its", the word "output" is not a big surprise. A good model gives it a high probability, and the coder spends only a few bits on it. The first letter of a new topic is different. Nobody can predict it well, and it costs many bits. This is why the best text compressors are now language models. They are slow, and they need a lot of memory, but they predict the next word better than any table of repeated strings. The file that they write is smaller because they are less often surprised.
2026-11-23T10:00:00Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=180 model=auto 2026-11-23T10:00:13Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=217 model=auto 2026-11-23T10:00:26Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=254 model=auto 2026-11-23T10:00:39Z INFO api.request method=POST path=/api/v1/chat/completions status=429 latency_ms=291 model=auto 2026-11-23T10:01:52Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=328 model=auto 2026-11-23T10:01:05Z INFO api.request method=POST path=/api/v1/chat/completions status=502 latency_ms=365 model=auto 2026-11-23T10:01:18Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=402 model=auto 2026-11-23T10:01:31Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=439 model=auto 2026-11-23T10:02:44Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=476 model=auto 2026-11-23T10:02:57Z INFO api.request method=POST path=/api/v1/chat/completions status=429 latency_ms=513 model=auto 2026-11-23T10:02:10Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=550 model=auto 2026-11-23T10:02:23Z INFO api.request method=POST path=/api/v1/chat/completions status=502 latency_ms=587 model=auto 2026-11-23T10:03:36Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=624 model=auto 2026-11-23T10:03:49Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=661 model=auto 2026-11-23T10:03:02Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=698 model=auto 2026-11-23T10:03:15Z INFO api.request method=POST path=/api/v1/chat/completions status=429 latency_ms=735 model=auto 2026-11-23T10:04:28Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=772 model=auto 2026-11-23T10:04:41Z INFO api.request method=POST path=/api/v1/chat/completions status=502 latency_ms=809 model=auto 2026-11-23T10:04:54Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=846 model=auto 2026-11-23T10:04:07Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=883 model=auto 2026-11-23T10:05:20Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=920 model=auto 2026-11-23T10:05:33Z INFO api.request method=POST path=/api/v1/chat/completions status=429 latency_ms=957 model=auto 2026-11-23T10:05:46Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=994 model=auto 2026-11-23T10:05:59Z INFO api.request method=POST path=/api/v1/chat/completions status=502 latency_ms=1031 model=auto 2026-11-23T10:06:12Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=1068 model=auto 2026-11-23T10:06:25Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=205 model=auto 2026-11-23T10:06:38Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=242 model=auto 2026-11-23T10:06:51Z INFO api.request method=POST path=/api/v1/chat/completions status=429 latency_ms=279 model=auto 2026-11-23T10:07:04Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=316 model=auto 2026-11-23T10:07:17Z INFO api.request method=POST path=/api/v1/chat/completions status=502 latency_ms=353 model=auto 2026-11-23T10:07:30Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=390 model=auto 2026-11-23T10:07:43Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=427 model=auto 2026-11-23T10:08:56Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=464 model=auto 2026-11-23T10:08:09Z INFO api.request method=POST path=/api/v1/chat/completions status=429 latency_ms=501 model=auto 2026-11-23T10:08:22Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=538 model=auto 2026-11-23T10:08:35Z INFO api.request method=POST path=/api/v1/chat/completions status=502 latency_ms=575 model=auto 2026-11-23T10:09:48Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=612 model=auto 2026-11-23T10:09:01Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=649 model=auto 2026-11-23T10:09:14Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=686 model=auto 2026-11-23T10:09:27Z INFO api.request method=POST path=/api/v1/chat/completions status=429 latency_ms=723 model=auto 2026-11-23T10:10:40Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=760 model=auto 2026-11-23T10:10:53Z INFO api.request method=POST path=/api/v1/chat/completions status=502 latency_ms=797 model=auto 2026-11-23T10:10:06Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=834 model=auto 2026-11-23T10:10:19Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=871 model=auto 2026-11-23T10:11:32Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=908 model=auto 2026-11-23T10:11:45Z INFO api.request method=POST path=/api/v1/chat/completions status=429 latency_ms=945 model=auto 2026-11-23T10:11:58Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=982 model=auto 2026-11-23T10:11:11Z INFO api.request method=POST path=/api/v1/chat/completions status=502 latency_ms=1019 model=auto 2026-11-23T10:12:24Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=1056 model=auto 2026-11-23T10:12:37Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=193 model=auto 2026-11-23T10:12:50Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=230 model=auto 2026-11-23T10:12:03Z INFO api.request method=POST path=/api/v1/chat/completions status=429 latency_ms=267 model=auto 2026-11-23T10:13:16Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=304 model=auto 2026-11-23T10:13:29Z INFO api.request method=POST path=/api/v1/chat/completions status=502 latency_ms=341 model=auto 2026-11-23T10:13:42Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=378 model=auto 2026-11-23T10:13:55Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=415 model=auto 2026-11-23T10:14:08Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=452 model=auto 2026-11-23T10:14:21Z INFO api.request method=POST path=/api/v1/chat/completions status=429 latency_ms=489 model=auto 2026-11-23T10:14:34Z INFO api.request method=POST path=/api/v1/chat/completions status=200 latency_ms=526 model=auto 2026-11-23T10:14:47Z INFO api.request method=POST path=/api/v1/chat/completions status=502 latency_ms=563 model=auto
5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e96b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4bd4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab354e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8aef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39de7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f09196837902699be42c8a8e46fbbb4501726517e86b22c56a189f7625a6da49081b24512c624232cdd221771294dfbb310aca000a0df6ac8b66b696d90ef06fdefb64a319581e27de7ced00ff1ce50b2047e7a567c76b1cbaebabe5ef03f7c3017bb5b74a44dc15364204a80fe80e9039455cc1608281820fe2b24f1e5233ade6af1dd54fc82b26aecb47d2868c4efbe3581732a3e7cbcc6c2efb32062c08170a05eeb86b51d431df5d7f141cbececcf79edf3dd861c3b4069f0b11661a3eefacbba9183fdba35f04dc8c462986c992bcf875546257113072a909c162f7e470e581e2788527a891e224136950ff32ca212b45bc93f69fbb801c3b1ebedac52775f99e61e629fa6598d732768f7c726b4b621285f9c3b85303900aa912017db7617d8bdbb17ef6d19c7a5b1ee83b907c595526dcb1eb06db8227d650d5dda0a9f4ce8cd94523540f1504cd17100c4835e85b7eefd49911580f8efff0599a8f283be6b9e34ec9599fc203d176a301536c2e091a19bc852759b255bd6818810a42c5fed14a9400f1b21cb527d7fa3d3eabba93557a18ebe7a2ca4e471cfe5e4c5b4ca7f767f5ca38f748a1d6eaf726b8a42fb575c3c71f1864a8143301782de13da2d9202b6f4b6612125fb3a0daecd2799dfd6c9c299424fd920f9b308110a2c1fbd8f443785f3ec7eb32f30b90cd0fcf3657d388b5ff4297f2f9716ff66e9b69c05ddd09535fa30d7e25dd8a49f1536779734ec8286108d115da5045d77f3b4185d8f790c2356069e9d1e79ca924378153cfbbfb4d4416b1f99d41a2940bfdb66c5319dbb7a56873cd771f2c446d369b649430b65a756ba278ff97ec81bb6f55b2e735695f9c4ab08cac7457e9111a30e4664920607ea2c115a1433d7be98e97e64244ca670671cd97404156226e507973f2ab8330d3022ca96e0c93bdbdb320c41adcaf59e19706d51d39f66711c2653cd7eb1291c94d9b55eb14bda74ce4dc636d015a35135aaa6cc23891b40cb3f378c53a17a1127210ce60e125ccf03efcfdaec458624b60c58c9d8bfb6ff1886c2fd605d2adeb6ea4da576068201b6c6958ce93f4eb1e33e8a81b697b75855af6bfcdbcbf7cbbde9f94962ceaec1ed8af21f5a50f