๐Ÿ“ Run-Length Encoding (RLE)

Output
a3b3c4d1
11 chars โ†’ 8 chars

Encodes and decodes run-length encoding (RLE), a simple compression scheme that replaces runs of identical characters with a "character + repeat count" format (e.g. aaa โ†’ a3). Useful for learning how basic compression algorithms work, or understanding the principle behind fax and bitmap image compression.

How to use

  1. Enter text in the "Encode" tab to see the compressed result (e.g. aaa โ†’ a3).
  2. Enter an RLE-format string in the "Decode" tab to reconstruct the original text.
  3. Click "Copy" to copy the result to your clipboard.

FAQ

Does this always shrink the input?

No. Strings with few repeated characters can actually get longer after encoding. RLE works especially well on data with long runs of identical values, like images with large solid-color areas.

Why does decoding fail with an error?

Input that isn't in the "character + digits" format (e.g. a character not followed by digits) can't be decoded.

Does this handle multi-byte characters like Japanese?

Yes, it processes text one character at a time, so Japanese characters are handled correctly.