About Binary to Hex
Binary to Hex rewrites binary numbers in hexadecimal. Paste a row of ones and zeroes, separated however you like, and each group comes back as the equivalent hex value - eight bits to two hex digits, which is why the sample reading 11111111 1010 comes out as ff a. It is the conversion people need when they are reading a flag register, a bitmask or a memory dump and the documentation gives one base while the tooling gives the other.
The text is trimmed and divided on whitespace and commas, and empty tokens are dropped, so a table pasted out of a document usually works without tidying up first. Each token is then read as a base-two integer and rewritten in base sixteen, and the results are joined with single spaces. The output is always lower case and always one line, because line breaks disappear along with the empty tokens.
The conversion is token by token and nothing is carried between them. That is exactly right for a list of values, and exactly wrong for one long binary string that is meant to represent a single large number, which is treated here as a series of separate groups. A token that cannot be read at all is passed through unchanged rather than flagged, which keeps a mixed list usable but also means a typo can slip through quietly.
How to use Binary to Hex
- 1 Paste the binary numbers into the panel, separated by spaces, commas or line breaks.
- 2 Read the live output, where each group has been rewritten in hexadecimal.
- 3 Copy the result into code, a register listing or a specification document.
- 4 Check each token at both ends of a long list if a typo is possible, since nothing is flagged as invalid.
Frequently asked questions
Why did 1012 turn into 5 instead of raising an error?
Because each token is read with the platform integer parser, which stops at the first character that is not a valid digit and keeps what it has already read. The digits 101 are valid binary and equal five, and the trailing 2 is simply ignored rather than reported.
Are leading zeros kept?
No. Every value is printed with the fewest hex digits that can represent it, so a byte written as eight zeroes and a one comes back as a single character. There is no padding option and no way to keep the original character count.
Can I convert one long binary number?
Not as a single value. The tokens are converted independently and never combined, so a long string representing one large number is treated as a series of separate groups with no carry between them.
How do I convert the other way?
Use the companion Hex to Binary tool on this site, which reads hex tokens and rewrites them in base two using the same rules in reverse.
Free, online, and private
Free to use
Binary to Hex is completely free. There is no account to create, no login, and no hidden charge or usage limit.
Runs online in your browser
It is a free online tool that runs entirely in your browser. Nothing to download or install — open the page and start using it right away.
Your data stays private
All processing happens locally on your device. Your input is never uploaded, stored, or tracked, so it never leaves your browser.
How Binary to Hex behaves in detail
These are the specifics of this implementation — the exact ranges, defaults and fixed settings you are working with.
| Parameter | Value |
|---|---|
| Input | binary numbers written as text; the sample reads 11111111 1010 |
| Tokenising | the text is trimmed and divided on whitespace and commas, and empty tokens are dropped |
| Conversion | each token is read as a base-two integer and rewritten in base sixteen |
| Result | the sample 11111111 1010 becomes ff a - lower-case hex digits joined with single spaces |
| Unreadable tokens | a token that cannot be read as binary is passed through unchanged rather than being reported as an error |
| Blank lines | line breaks and blank lines are dropped along with the empty tokens, so the output is always a single line |
Compiled from the implementation of this tool and checked against it by itoolnet.
What Binary to Hex does not do
Knowing the edges of a tool saves more time than another list of its features. These are the cases where it will not do what you might expect.
- Reading stops at the first bad character. Each token goes through the platform integer parser, which keeps the digits already seen and ignores the rest, so 1012 is quietly converted to 5 and a token written with a 0b prefix comes out as 0 instead of being refused.
- Width is not preserved. Every value is printed with the fewest hex digits that can represent it, so 00000001 comes out as 1; there is no padding, no grouping into bytes and no way to keep the original character count.
- The tokens are never combined. Each one is converted on its own, so a long binary string that represents a single large number is treated as a series of separate values, and there is no carry or joining step that could put them back together.
Tested and documented by itoolnet, the team that builds and maintains this site.