Skip to main content
UtilityStack

Number Base Converter — binary, octal, decimal, hex, more

Type a number in any base from 2 to 36 and instantly see it in binary, octal, decimal, hex, plus any custom base. BigInt-backed so huge numbers work without precision loss.

  • Binary (base 2)11111111
  • Octal (base 8)377
  • Decimal (base 10)255
  • Hex (base 16)ff
  • 73

What is a number base?

A number base (or radix) is the count of distinct digits used to express numbers — base 10 (decimal) uses 0-9, base 2 (binary) uses 0-1, base 16 (hex) uses 0-9 and a-f. The same numerical value can be written in any base; only the symbols change. Computers internally store everything in binary; programmers commonly read it in hex (each hex digit represents 4 bits = a nibble).

This converter handles bases from 2 (binary) to 36 (digits 0-9 plus a-z), with parsing and emission backed by JavaScript's BigInt — so a 200-digit hex number converts cleanly to a 600+-digit binary number without precision loss. The four common bases (2, 8, 10, 16) are always shown; pick a custom base for the long tail of unusual radixes.

How to use this tool

  1. Pick the source base from the dropdown. Defaults to 10 (decimal).
  2. Type or paste your number in the input field. Letters are accepted for hex and bases above 10. Invalid characters for the chosen base highlight the input red.
  3. Read the value in binary, octal, decimal, hex automatically. For other bases (3, 7, 36, etc.), use the custom base row at the bottom. Click Copy on any line to grab that representation.

Frequently asked questions

Why use BigInt?

Native JavaScript numbers (Number) lose precision past 2^53 (~9 quadrillion) — the conversion would silently drop digits for values that fit easily in 64-bit hex. BigInt has no upper limit, so even a 100-digit decimal number round-trips exactly through binary or hex.

Why max base 36?

Because that's the largest base where standard numerical-then-alphabetical digits work without ambiguity (0-9, then a-z = 36 symbols). Bases 37 and beyond would need to invent new symbols. Practically, almost all real use cases sit in {2, 8, 10, 16, 36}.

Does it support negative numbers?

Currently the parser only accepts unsigned values. Negative numbers (and signed binary representations like two's complement) need explicit choice of bit-width — out of scope for a quick converter. Use a programmer's calculator for two's-complement work.

What about fractional numbers?

Only integers. Fractional binary/hex (1.5 = 1.8 in hex) is unusual and the conversion is more complex. For floating-point representation in different bases, see IEEE-754 explainers.

Are my numbers private?

Yes. Conversion runs entirely in your browser. Your numbers — even sensitive ones like memory addresses or hash values from a debug session — never reach our servers.

Common use cases

Where flipping between number bases pays off in seconds.

Reading hex memory dumps

Memory dumps from a debugger come in hex. Convert a suspicious value to decimal to spot whether it's a count, a pointer, or a recognisable constant (4096 = page size, 1000000 = micro-second tick, etc.).

Bit-manipulation problem solving

When working out bitwise AND/OR/XOR by hand, converting between hex and binary makes the bits visible. Useful for embedded programming, protocol parsing, file format reverse-engineering.

Colour codes

CSS colours come in hex (#ff8800) but design tools sometimes show RGB (255, 136, 0). Convert each hex pair to decimal — or paste 16744448 to see it in hex.

Encoding base-N IDs

Some systems use base-36 for short IDs (URL shorteners, license plates). Convert your decimal ID to base-36 and you've got a shorter human-readable form.

Tips and shortcuts

Habits that make base conversions intuitive.

Memorise hex multiples of 16

10 = 16, 100 = 256, 1000 = 4096, FF = 255, FFFF = 65535. These come up constantly in programming. The pattern: every two hex digits = a byte (0-255).

Binary in groups of 4

When reading binary by hand, group bits in 4s — each group is one hex digit. 1010_1100_1111 → AC F. Faster than counting bits one at a time.

Octal is mostly historical

Unix file permissions (chmod 755) still use octal but very little else does. Don't fall into 'using octal because it looks cool' — hex is more common in modern code and easier to read.

Don't over-rely on JavaScript's parseInt

parseInt('0xFF', 16) returns 255, but parseInt('FF') with no radix can vary. Always pass the radix explicitly. This converter shows the right answer regardless; in code, be defensive.

Ähnliche Tools