Elias delta encoding
Encode positive integers with the Elias delta universal code, and decode them back.
Elias delta encoding
Elias delta coding is a universal code for positive integers: every number becomes a self-delimiting run of bits, so a whole sequence of codes packs together with no separators and still reads back unambiguously. It is used in data compression and in algorithms that need compact, prefix-free integer codes. This tool encodes a list of numbers into an Elias delta bit stream, and decodes a bit stream back into numbers, entirely in your browser.
Pick Encode or decode. For encoding, type numbers separated by spaces, commas or line breaks — the input format lets you write them as decimal text, as hexadecimal, or switch to bytes, which treats the whole input as ordinary text and encodes its raw UTF-8 bytes, so any string, accented letters and emoji included, round-trips losslessly. The output format controls how the resulting bits are shown: raw 0s and 1s, packed hexadecimal, or a list of decimal byte values. Decoding reverses the same options: input format describes the bit stream you paste in, output format describes how the recovered numbers, or reconstructed text with bytes, are written.
Wrap long lines at a fixed width to keep results readable, and use keep padding to control whether text output is right-padded to a whole byte and whether trailing zero bits are tolerated when decoding. Malformed input — a number below 1, a stray character, an odd count of hex digits, a truncated code — is caught and explained with a specific message rather than a silent wrong answer.
Everything runs locally: your numbers and text never leave the browser. Copy the result, download it as a .txt file, or send the output back into the input to chain another round.