Binary / Hex / Base32 / Octal Converter
Convert text to and from binary (8-bit ASCII), hex, base32, and octal. Multi-format. Spacing and separator options. Copy all. 100% offline.
About this tool
A multi-format numeric encoding tool for text. Encode any UTF-8 string into four representations at once: Binary (8-bit ASCII, separated by space by default), Hex (lowercase or uppercase, space-separated), Base32 (RFC 4648, the same alphabet used in TOTP and many crypto libraries), and Octal (3-digit, space-separated). The Decode tab reverses the process: pick the format, optionally specify a separator, paste the encoded text, and get the original string back. Invalid characters produce a clear error message ("not valid binary", "not valid hex", etc.) so you know exactly which format is expected. UTF-8 is handled correctly — emojis and accented characters round-trip cleanly because the converter operates on bytes, not characters. The Copy All button grabs all four encoded forms with their labels, one per line. 100% offline, no CDN.
Details
- Category
- developer
- Version
- 1.0.0
- Size
- 12 KB
- Updated
- Jun 2026
Frequently Asked Questions
What is the difference between binary, hex, base32, and octal?
All four are positional numeral systems that represent the same underlying bytes. Binary is base 2 (each digit is 0 or 1) — the native format of computers. Hex is base 16 (digits 0-9, A-F) — the most common shorthand for binary because each hex digit represents 4 binary digits, so 4 bytes (32 bits) become 8 hex characters. Base32 is base 32 (alphabet A-Z and 2-7) — less compact than hex but case-insensitive and URL-safe, used in TOTP secrets and some file systems. Octal is base 8 (digits 0-7) — older Unix file permissions and some assembly languages. They are interchangeable representations; the tool lets you pick whichever is most convenient for the context.
How does the UTF-8 handling work?
The tool operates on bytes, not characters. The encode step uses TextEncoder to convert the input string to a UTF-8 byte array, then formats each byte in the chosen representation. The decode step parses the encoded form back to a byte array, then uses TextDecoder with the fatal flag to convert bytes back to a string. If the byte array is not valid UTF-8, the decoder throws and the tool falls back to a lossy ASCII visualization (replacing each non-ASCII byte with a dot). This means emoji and accented characters round-trip cleanly in the encode/decode direction, but pasting random binary that is not UTF-8 will give you the lossy fallback.
Why is Base32 padded with = signs?
Base32 represents bytes in 5-bit groups. The input byte count is rarely a multiple of 5, so the output is padded with = signs to make its length a multiple of 8 characters. This is the RFC 4648 standard. The decoder strips trailing = signs before processing, so you can paste Base32 with or without the padding. The alphabet is the standard A-Z, 2-7 (32 symbols), which is why Base32 is case-insensitive — the encoder emits uppercase by convention, but the decoder accepts both cases.
What does the separator option do on the Decode tab?
By default the decoder strips all whitespace, so a hex string with spaces, a binary string with spaces, or an octal string with newlines all parse correctly. The separator field lets you declare a specific separator (e.g. a colon, a comma, or "0x") that you want preserved in the output display. The decoder itself does not care what separator you use; it just removes all non-hex/non-binary/non-octal characters before parsing. The field is mostly for documentation — paste your formatted input, see it parsed correctly.
Is my data private?
Yes. The encoders and decoders are pure JavaScript implementations of the standard algorithms, inlined in the HTML. There are no network calls and no CDN. The text you encode or decode never leaves your device. You can convert sensitive strings (passwords, tokens, internal IDs) without any data being transmitted.