Number Base Converter
Binary, octal, decimal, hex — and every base from 2 to 36.
Runs entirely in your browser — nothing you enter is uploaded or sent to a server.
Whole numbers only — fractional values in a non-decimal base aren't supported, because converting them means rounding and we'd rather refuse than round silently. Very large values are exact here, but check how your own language handles them before pasting the result into code. Read our full disclaimer.
About this tool
Paste a value in any base from 2 to 36 and see it in binary, octal, decimal and hexadecimal at once, because if you are looking at 0xFF you usually want both the decimal and the binary rather than running two conversions. Prefixes and separators are stripped for you, so a value copied straight out of a debugger works without hand-editing. The conversion is done with arbitrary-precision integers, which matters more than it sounds: JavaScript's ordinary numbers lose accuracy above about 9 quadrillion, so a 64-bit hex value converted by most in-browser tools comes back wrong in its last few digits — and wrong in a way that looks entirely plausible. Here the answer is either exact or refused.
Example
255 in decimal is FF in hexadecimal, 377 in octal, and 1111 1111 in binary. The binary is grouped in fours because each group of four is exactly one hex digit.
How to use
- 1Type or paste the value.
- 2Pick the base it's currently in — or choose Other for anything from 2 to 36.
- 3Read it in every base at once, and copy whichever you need.
Features
- Binary, octal, decimal and hex shown together, from one input.
- Any base from 2 to 36, including base 32 and base 36.
- Exact for values of any size — no silent precision loss on 64-bit numbers.
- Accepts 0x, 0b and 0o prefixes plus spaces, commas and underscores.
- Binary and hex grouped in fours so the two line up by eye.
Frequently asked questions
Why do other converters give a different answer for large hex values?
Because most use JavaScript's parseInt, and ordinary JavaScript numbers can only hold integers exactly up to about 9,007,199,254,740,991. Convert FFFFFFFFFFFFFFFF and parseInt returns 18446744073709552000, where the true value is 18446744073709551615 — wrong in the last four digits. This tool uses arbitrary-precision integers, so there is no ceiling.
What do the 0x and 0b prefixes mean?
They're the conventional markers programming languages use to say which base a literal is written in: 0x for hexadecimal, 0b for binary, 0o for octal. They're notation rather than part of the number, so this tool strips them — you can paste a value straight from your code or debugger.
Why is binary shown in groups of four?
Because four binary digits are exactly one hexadecimal digit. 1111 is F, 1010 is A. Grouping in fours means you can read the hex line and the binary line against each other without counting, which is the main reason hex is used for binary data at all.
Can I convert a number with a decimal point?
No, and that's deliberate. Fractions in a non-decimal base rarely terminate — a third is 0.0101010… in binary — so any answer has to round, and a converter that rounds without telling you is worse than one that declines. Whole numbers only here.
What's the point of base 36?
It uses all ten digits plus all 26 letters, so it's the most compact way to write a number using only alphanumerics. That makes it common in short URLs and generated IDs, where you want the shortest string that's still safe to type and put in a URL.
More developer tools
View allJSON Formatter
Paste raw JSON and get it neatly indented, minified, or validated — entirely in your browser, with a clear error message pointing to anything invalid.
Open toolBase64 Encoder / Decoder
Encode any text to Base64 or decode it back, instantly and locally — with full Unicode and emoji support, and nothing ever leaving your browser.
Open toolUUID Generator
Create one or many version-4 UUIDs for IDs, keys, and test data — generated securely on your device with the Web Crypto API, ready to copy in bulk.
Open tool