Number Base Converter
Convert integers between binary, octal, decimal, and hexadecimal instantly - supports large numbers via BigInt.
- Free, no account
- No watermark
- No usage limit
About the Number Base Converter
Paste a long hexadecimal value into most free base converters and there's a decent chance the number that comes back is quietly wrong, and it'll look completely fine on the page. It usually ends in a tidy run of zeros where the real value should have messy digits, with nothing to warn you. A lot of these tools do their arithmetic the way a pocket calculator does, in floating point, and that kind of math starts silently dropping whole integers past about nine quadrillion. Run a 256-bit key or a big file offset through one and it hands back a rounded answer you have no reason to distrust.
This one refuses to round. It does exact whole-number math with no ceiling, so a four-bit f and a 256-bit crypto value convert with identical precision. Nothing rounds your number without telling you. And instead of the usual pick-a-from-base, pick-a-to-base, read-one-answer routine, it shows all four bases at once, binary, octal, decimal, and hex, updating live as you type. The card matching your input base gets a ring around it so you always know which column you started from. The whole thing runs in your browser and nothing you type is sent anywhere, so a private key or an internal offset stays on your machine instead of on some stranger's server.
Two caveats up front, because both trip people. It handles integers only, no decimal point. And it shows negatives as sign-and-magnitude, a plain minus out front, not two's complement, which matters if you're decoding a signed value out of a register, and there's a section on that further down.
How to use
- Pick the input base from the dropdown: binary, octal, decimal, or hex. That tells the tool how to read your digits. It starts on decimal.
- Type the number. The placeholder shows an example for whichever base you chose. Leave off the prefix, so in hex you type
ff, not0xff. Case doesn't matter,FFandffread the same. - Read the four cards. As soon as the input is valid they fill with the binary, octal, decimal, and hex versions, each with its usual prefix (
0b,0o,0x, nothing for decimal) so you can paste a result straight into code. - For a negative, put a minus in front (
-255, or-ffin hex). Every card keeps the sign, and the digits after it get checked exactly like a positive number. - Switch bases whenever you want. The field clears on purpose when you do, so you don't drag a value from the old base into a new one where it means something else.
There's no submit button, so every keystroke redraws all four cards. Editing a hex string one character at a time and watching which bits flip over in the binary column is the quickest way I know to build a real feel for what a value is doing.
Big numbers are where the cheap converters break
On small values almost anything works and none of this shows up. The gap only opens on large integers, and it opens wide. Take a long hex hash or a 64-bit address, convert it in some basic tool, then check the decimal against a second source. A lot of the time they won't agree, and the wrong one is the tool that rounded. The giveaway is a decimal ending in a clean string of zeros where a real number would be messy.
Because the math here is exact, that failure mode is gone. There's no largest number it handles, only how much you feel like typing. Hashes, fat bitmasks, page-table entries, arbitrary-length IDs, all exact.
The live all-columns view is the other half of the reason to reach for this one. You're not configuring one conversion and reading a single answer, you type once and see the value in every base at once, so checking a hex number against its binary bits takes no second lookup.
The two's complement trap with negatives
Negatives are the one spot where a careless converter will hand you a confident wrong answer. This tool shows a negative as sign-and-magnitude: it takes the absolute value, converts that, and puts a minus in front. So -10 in decimal is -1010 in binary and -a in hex. Clean, readable, and the form you want for math or a number literal in almost any language.
Hardware doesn't store negatives that way, though. Real machines use two's complement, where there's no separate sign character, the top bit carries the sign, and a negative gets encoded by flipping every bit of the positive value and adding one. In an 8-bit byte, -1 is stored as 11111111, which read as an unsigned number is 255. So pull 0xFF out of a register wondering whether it's meant to be -1, and this tool tells you 255, because it has no idea how wide your register is or whether you meant the value as signed. Neither answer is wrong, they're just answers to two different questions.
For decoding a raw signed value out of a fixed-width register, you need to know the bit width and apply two's complement yourself. No general four-base converter can guess that context, and one that pretends to is quietly making an assumption you ought to be questioning.
Hex to binary is four bits, always
Worth memorizing, because it makes half of this tool optional. Sixteen is two to the fourth, so one hex digit maps to exactly four binary bits with nothing left over. 1111 is f, 0000 is 0, and two hex digits cover a full byte from 00 to ff. That's why 0xDEADBEEF is a compact way to write 32 bits, four at a time instead of thirty-two. Group any binary number into fours from the right, translate each group, and you've gone to hex without touching decimal. Those same byte pairs are how web colors work, #1e90ff is three bytes of red, green, and blue, and if you juggle colors a lot our hex to rgb converter splits one directly.
Octal hangs on in one stubborn corner, Unix file permissions. When you run chmod 755, that 755 is octal and each digit is three bits, read is 4, write is 2, execute is 1. Convert 755 from octal here and you get 111101101, and those nine bits are the permission switches in order, owner then group then others. If you'd rather tick boxes than count bits, our chmod calculator builds the string for you.
Frequently asked questions
Does it convert base 32 or base 36?
No, it sticks to the four that run computing and math: base 2, base 8, base 10, and base 16. Base 32 and base 36 are real and turn up in short-link schemes and some ID encodings, but they mix letters and digits under their own rules, and folding them in would clutter the common case to serve a rare one. A dedicated base-N encoder fits those better.
Why won't it take a decimal point?
It does whole numbers only, so 3.14 won't validate. That's not a shortcut. Converting the fractional part between bases is a genuinely messier problem, a tidy decimal like 0.1 becomes an infinite repeating pattern in binary, which forces a rounding call and kills the exactness. Integers are what keep every conversion here precise. For fractional work you want a calculator built for it.
Can I get the hex in uppercase?
Not here, the output is lowercase. That's what most modern tooling emits, CSS colors, Git object hashes, and OpenSSL all lean that way, so it pastes in cleanly. If your spec wants uppercase, and some assembly dialects do, uppercase it wherever you paste. The value is identical, letter case is purely cosmetic here.
Do leading zeros change anything?
No. 00001010 and 1010 are the same value, ten. Leading zeros only pad the width for display or for lining up bytes in a table, they never touch the quantity. The tool reads them and carries on, and it won't pad the output for you, so if you need eight bits shown, add the zeros yourself after you copy.
The field turned red. What did I do?
Almost always a digit that doesn't belong to the base you picked. Binary takes 0 and 1 only, octal 0 through 7, hex 0 through 9 plus a to f. Drop an 8 into binary mode or a g into hex and the field flags it and lists the allowed characters rather than silently returning junk. The other common culprit is pasting a prefix, since 0xff fails in hex mode because x isn't a hex digit.
Does it work offline?
Once the page has loaded, yes. Drop your connection and it keeps converting, the whole thing happens locally with no server call. Nothing you enter is transmitted, logged, or saved, and it's gone the second you close the tab. Want to prove it? Watch the network panel stay silent while you type.