Canonical: https://toolipedia.app/compression-and-coding-demos

# Compression and Coding Demos

See Huffman coding step by step with frequency table, merge steps and codes, run-length encoding, LZ77 triples and Hamming (7,4) error correction for the text or bits you type.

Breadcrumbs: Toolipedia > Text tools > Text tools > Compression and Coding Demos

## About Compression and Coding Demos

Four classic algorithms, shown with your own input instead of a diagram. Huffman coding builds a code table from letter counts, listing the frequency table, every merge step, the codes and the encoded bit string; abracadabra shrinks from 88 bits to 23. Run-length encoding turns WWWB into 3W1B and back. LZ77 writes offset, length and next-character triples from a sliding window. Hamming (7,4) adds three parity bits to four data bits so that one flipped bit can be found and corrected, and you can flip one to see it work.

## How to use Compression and Coding Demos
1. Choose Huffman, run-length, LZ77 or Hamming.
2. Type your text, or the data bits for Hamming, and adjust the window or the flipped bit if shown.
3. Read the steps and tables, then copy the encoded result.

## Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
- Free to embed on your own website, with a ready-made code to copy.

## Also known as
- compression and coding demos
- huffman coding calculator
- run length encoding online
- lz77 compression example
- hamming code calculator
- huffman tree generator

## Frequently asked questions

### Why can two Huffman tools give different codes?

When counts tie, the order in which nodes are joined can differ, which swaps some bits. Every valid tree gives the same total length, so the encoded size stays the same.

### When does run-length encoding make data bigger?

When there are few repeats. Text such as abc becomes 1a1b1c, which is longer. It only pays off on long runs, like images with large flat areas.

### What does the Hamming syndrome tell me?

The three parity checks form a number from 0 to 7. Zero means no error found, and any other value is the position of the single bit that flipped, which the decoder then flips back.

### Is Compression and Coding Demos free?

Yes. Compression and Coding Demos on Toolipedia is free to use, with no sign-up and no watermark.

### Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

### Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

### Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

### Can I put Compression and Coding Demos on my own website?

Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.

## Related tools

More free tools that go well with Compression and Coding Demos:
- [Text Byte Counter and Encoding Viewer](https://toolipedia.app/text-byte-counter-and-encoding-viewer)
- [String Similarity and Edit Distance](https://toolipedia.app/string-similarity-and-edit-distance)
- [Text Compression and Decompression](https://toolipedia.app/text-compression-and-decompression)
- [Combine Text Files](https://toolipedia.app/combine-text-files)
- [Morse code translator](https://toolipedia.app/morse-code-translator)
