About the Huffman Encoding Visualizer

Watch a greedy compression algorithm build its tree, one merge at a time.

What it is

The Huffman Encoding Visualizer builds a Huffman tree from any text you enter, listing every merge step as the two lowest-frequency nodes combine into a new parent. From the finished tree, it derives each character's binary code, encodes the input, and compares the result to fixed-length encoding.

Features

Step-by-step merges

Every node-combining step listed in order, not just the final tree.

Code table

Each character's binary code derived from its root-to-leaf path.

Compression stats

Huffman-encoded bit length compared directly to fixed-length encoding.

Encode/decode verification

Decodes the bitstring back to the original text to confirm correctness.

Ready to use it?

Free, no sign-up required.

Open the Huffman Encoding Visualizer