Number Base Converter

Convert between decimal, hexadecimal, binary and octal — free, live, four-way, with arbitrary-precision BigInt so large numbers stay exact.

100% private — runs entirely in your browser. Nothing you enter is uploaded or logged.

100% private — runs in your browser

Uses arbitrary-precision BigInt, so very large integers convert exactly (native JavaScript numbers lose precision above 2⁵³). Prefixes like 0x and 0b are accepted. Calculated locally.

How to use the Number Base Converter

  1. Type a value in decimal, hex, octal or binary.
  2. The other three bases update instantly.
  3. Toggle digit grouping for readability.
  4. Prefixes like 0x and 0b are accepted.

What you can use it for

  • Convert hex colour or byte values to decimal
  • Work with binary and hex in low-level code
  • Convert large integers exactly with BigInt
  • Check the 0x/0b representation of a number

More free tools

Wrangling code or data?

Format, encode, hash and minify with our free developer tools — 100% in your browser.

Browse all free developer tools →

Frequently asked questions

How do I convert hex to decimal?

Type the hex value (with or without a 0x prefix) and the decimal, binary and octal fields update instantly.

What is 0xFF in decimal?

255 — and 11111111 in binary, 377 in octal. Enter it and all bases fill in.

How do I convert binary to hex?

Enter the binary digits in the binary field; the hexadecimal equivalent appears in the hex field automatically.

Does it handle very large numbers?

Yes — it uses BigInt, so integers far beyond JavaScript's normal 2^53 limit convert exactly with no rounding.

What do the 0x and 0b prefixes mean?

0x marks a hexadecimal number and 0b marks a binary one; the converter accepts and strips them for you.