Binary Converter
Convert numbers between binary, decimal, hexadecimal, and octal with linked live fields — plus text to UTF-8 binary or hex bytes and back.
Processed locally in your browser — nothing is uploaded.
Binary Converter
Edit any field and the others update. Prefixes (0b, 0o, 0x), spaces, and _ separators are accepted; values of any size work thanks to BigInt.
About Binary Converter
Four linked fields — binary, octal, decimal, and hexadecimal — stay in sync as you type in any of them. Values are handled with BigInt, so numbers far beyond 2^53 convert exactly. Prefixes (0b, 0o, 0x), spaces, and underscore separators are accepted.
Text mode converts a string to its UTF-8 bytes shown as binary or hex, and decodes byte sequences back to text, with clear errors for invalid UTF-8.
Common uses
- Read a hex constant or bitmask from code as decimal
- Convert file permission or flag values between bases
- Inspect what bytes a string actually encodes to
Example
Input
255 (decimal)
Output
0b11111111 · 0o377 · 0xff
Frequently asked questions
Why do huge numbers convert exactly here when calculators round them?
Values are handled as BigInt, an arbitrary-precision integer type, instead of 64-bit floating point. Ordinary calculators lose precision above 2^53 (about 9 quadrillion); here a hundred-digit number converts between bases without error.
Are the numbers or text I convert uploaded anywhere?
No. All conversion happens in your browser as you type — nothing is sent to or stored on a server.
Can I paste values with 0x prefixes or underscore separators?
Yes. Each field accepts its matching prefix (0b, 0o, 0x), plus underscores and spaces as digit separators — so 0xDEAD_BEEF or 1111 0000 parse fine. Negative values work with a leading minus sign; fractions are not supported since conversion is integer-only.
Why does one character sometimes turn into several bytes?
Text mode shows UTF-8, a variable-length encoding: ASCII characters take 1 byte, accented letters like é take 2, most CJK characters take 3, and emoji take 4. The byte count therefore often exceeds the character count.
Why won't my binary string decode back to text?
Binary input must contain only 0s and 1s and total a multiple of 8 bits, since UTF-8 is decoded byte by byte; spaces, commas, and newlines between bytes are fine and get stripped. If the length checks out but decoding still fails, the bytes are not valid UTF-8.