Number Base Converter - Binary, Octal, Decimal and Hex, Exactly
File permissions, colour codes, memory addresses, bitwise flags - bases are everywhere in development. Type a value in any base and read it in all four, with precision that does not silently round your big numbers away.
How to use the Number Base Converter
- Type or paste the number into the Value box.
- Choose which base the value is written in.
- Read the same value in binary, octal, decimal and hexadecimal - results update as you type.
- Use the Copy buttons to take any representation with you.
How it works
The converter first validates every character against the digits allowed in your chosen base - enter a 2 in a binary value and it tells you exactly that, instead of guessing. It then builds the value with arbitrary-precision integer arithmetic (BigInt): each digit multiplies the running total by the base and adds itself, a process that stays exact for numbers of any length. Finally it renders that exact value in each of the four bases. Negative values keep their sign through every step.
Worked example
The decimal value 18446744073709551617 - one more than 2^64 - is larger than any normal JavaScript number can hold exactly. Here it still converts precisely: hexadecimal 10000000000000001, and a 65-digit binary string ending in 1, where a floating-point converter would quietly round it.
Frequently Asked Questions
Is this number base converter free?
Yes - completely free, with no sign-up, no size limit and no daily cap.
How large a number can it convert?
Effectively unlimited. The conversion uses BigInt arithmetic, so values with hundreds of digits convert exactly. The familiar 2^53 limit of ordinary JavaScript numbers does not apply.
Does it handle fractions like 3.14?
No - this converter is for integers, which is what bases are used for in practice (addresses, permissions, colours, flags). A decimal point in the input is reported as an invalid digit rather than silently dropped.
What if I type a digit that does not exist in the base?
You get a specific error naming the digit and the base - for example, digit "8" cannot appear in an octal value, and "g" cannot appear in hexadecimal.
Is my input uploaded to a server?
No. Conversion happens 100% in your browser. Your values never leave your device.
Related Developer Tools
Chmod Calculator
Tick read/write/execute boxes for owner, group and others - get the octal and symbolic permission instantly.
Hash Generator
SHA-1, SHA-256, SHA-384 and SHA-512 digests of any text, computed in your browser.
Timestamp Converter
Convert Unix timestamps to human dates and back - UTC, your local time and relative time.