This tool converts text into three common encodings at once — 8-bit binary, hexadecimal, and base64 — and can also generate random byte strings in the same formats. It handles full UTF-8, so accented characters and emoji are encoded as their real multi-byte sequences rather than guessed.
How it works
Text is first turned into bytes with the browser’s TextEncoder, which produces a UTF-8 byte sequence. Those bytes then drive each representation:
- Binary writes every byte as 8 bits, zero-padded, separated by spaces.
- Hexadecimal writes every byte as two hex digits.
- Base64 packs the bytes into groups of three and maps each group to four printable characters using the standard alphabet.
In random mode the tool fills a byte array with crypto.getRandomValues when available — the cryptographically secure generator — and renders those bytes in all three encodings.
Tips and notes
- The byte count shown above the results is the true UTF-8 size; a single emoji often counts as four bytes.
- Hex is the most compact human-readable form; binary is the most explicit; base64 is best for embedding bytes inside JSON or URLs.
- Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide secrets.