Skip to content
Your data never leaves your browser

Hex to Decimal & Number Base Converter

One number, five representations. Type it in decimal, hex, binary, or octal, see it in all of them.

Input
Results
Decimal
255
Hexadecimal
0xFF
Binary
0b11111111
Octal
0o377
Base 36
73

What this does

DEVS: BigInt.toString(radix) under the hood. Prefix-aware parsing: 0x, 0b, 0o. No upper bound on input size.

Type a number in decimal, hex, binary, or octal and see it in all four, plus base36, at once. Prefix-aware: 0xFF is hex, 0b1010 is binary, 0o77 is octal. No prefix means decimal.

Common use cases

Reading file permissions. chmod 755 makes more sense in binary. Type it as 0o755 (plain 755 is decimal) and you get 111 101 101. Owner gets read+write+execute, group and others get read+execute.

Working with memory addresses and color codes. You're staring at 0x1A3F in a debugger and need the decimal value. Or converting a hex color to figure out its RGB breakdown.

Generating compact IDs. Base36 packs the most information into the fewest alphanumeric characters when case doesn't count. Reddit's post IDs work this way. Type a big decimal, grab the base36 version.

Things to know

Uses BigInt internally, so there's no upper bound on number size. Your 256-bit key will convert fine. Number.MAX_SAFE_INTEGER doesn't apply here because we never touch a JavaScript Number.

Negative numbers work. The sign carries through to every base representation. -42 gives you -2A in hex, -101010 in binary.

Base36 uses digits 0-9 plus letters a-z. It's the densest case-insensitive alphanumeric encoding. Beyond that you're into Base58 and Base62, which need mixed case, or Base64, which adds symbols.

Privacy

All conversion happens in your browser. No server, no network request, no reason to worry about pasting internal values. We can't see what you type because there's nowhere for it to go.

Questions

How do I convert hex to decimal?

Type the hex value with a 0x prefix and read the decimal row. 0xFF comes back as 255. Plain FF is an error, because no prefix means decimal. Every other base updates at the same time, so you also get binary, octal, and base36 for free.

How do I convert binary to decimal?

Type the binary digits with a 0b prefix and read the decimal row. 0b1010 is 10. Skip the prefix and 1010 is one thousand and ten. Same deal in reverse: type a decimal number and the binary row shows you the bits.

What do the 0x, 0b, and 0o prefixes mean?

They tell the parser which base you meant. 0x is hex, 0b is binary, 0o is octal, and no prefix means decimal. It's the same notation most programming languages use, so you can paste straight from code.

Can it handle really large numbers?

Yes. It uses BigInt internally, so there's no size cap. A 256-bit key converts cleanly, no rounding, no loss of precision. JavaScript's usual safe-integer limit doesn't apply here because no plain Number is ever involved.