AB
aiBytes
125 tools in one library
Live workspace

Huffman Encoding Tool

Build prefix trees and compare compressed output with original size.

Compression & CodingFeatured
Input

Huffman Encoding Tool

Encode text into prefix codes or decode a bitstream with a supplied Huffman codebook.

  • Encode mode returns the codebook and compression stats together.
  • Decode mode expects a JSON object codebook such as {"a":"0","b":"10"}.
  • Huffman performs best when the source contains repeated characters.
Status
Waiting for input
Output

Huffman result

Review the result and copy the output you want to keep.

Output preview

The encoded bits, decoded text, codebook, and compression stats will appear here.