Huffman Encoder

Huffman Coding is a way to generate a highly efficient prefix code specially customized to a piece of input data. It makes use of several pretty complex mechanisms under the hood to achieve this. Now you can run Huffman Coding online instantly in your browser! Enter text and see a visualization of the Huffman tree, frequency table, and bit string output!

Download the code from the following BitBucket repository: Code download

Warning: If you supply an extremely long or complex string to the encoder, it may cause your browser to become temporarily unresponsive as it is hard at work crunching the numbers. Also note that the huffman tree image generated may become very wide, and as such very large (in terms of file size). You have been warned. Start small.

Like what you're seeing? Consider sending in a donation at!