Number Base Converter

Convert numbers between binary, octal, decimal, and hex.

Input and custom output bases support integers from 2 to 64. 0x, 0b, and 0o prefixes are accepted as a local convenience.

Runs locally in your browser. Your input is not uploaded or stored. You can verify this in your browser’s network panel.

What does this tool solve?

Convert integers from any input base 2–64 to Binary, Octal, Decimal, Hexadecimal, Base64, and a custom output base.

What examples should you start with?

Decimal to hex

Input

255 (decimal)

Output

hex ff · binary 11111111 · octal 377

Prefixed hex

Input

0xdeadbeef

Output

decimal 3735928559

Large values

Input

2^64 = 18446744073709551616

Output

hex 10000000000000000 — exact, no float rounding

How does it work?

Input is validated against the digit set of the selected base, parsed with BigInt, and re-rendered in every output base — so arbitrarily large integers stay exact.

A 0x / 0b / 0o prefix overrides the selected base, matching the convention in most programming languages.

What are the edge cases and limits?

  • Negative values convert with a leading minus sign applied to every base.
  • Fractional numbers are not supported — integer bases only.
  • Hex letters are case-insensitive on input, lowercase on output.

Technical reference

Related tools