Skip to main content

Number Base Converter

Convert between binary, octal, decimal, hexadecimal and any base up to 36.

Number

Paste a value starting with 0x, 0b or 0o and the base is set for you.

About this tool

The number base converter converts between binary, octal, decimal, hexadecimal and any base up to 36, showing every base at once in a single table.

What separates it from most converters is accuracy on large values. Most are built on parseInt, which returns a JavaScript number — exact for integers only up to about 9 quadrillion. Past that it rounds silently, with no warning at all.

That matters, because the values people most often bring to a base converter are exactly the ones over that limit: hashes, 64-bit IDs and bitmasks. This tool computes with BigInt, so every digit is right, and it displays a warning when your value is large enough that other tools would start being wrong.

It also accepts values prefixed with 0x, 0b or 0o and sets the base for you, and tolerates the underscores or spaces used to group long literals — so you can paste straight out of code.

How to use

  1. 1Type a number, or paste one starting with 0x, 0b or 0o to set the base automatically
  2. 2Pick the input base if the guess was wrong
  3. 3Read the converted value in every common base, or expand to all 34
  4. 4Copy whichever base you need

Frequently asked questions

How large a number can it handle?
Effectively unlimited, because it computes with BigInt. A value like ffffffffffffffff (64 bits) converts with every digit correct, where a parseInt-based tool rounds it silently.
Why do 64-bit values come out wrong in other converters?
JavaScript numbers are double-precision floats, exact for integers only up to about 9 quadrillion. Beyond that they round — so a 64-bit hash or ID is corrupted with nothing to indicate it happened.
Can I use underscores as separators?
Yes, underscores and spaces both: 1111_0000 or 1 000 000. They are stripped before conversion, so you can paste an already-grouped literal straight from code.
Are negative numbers supported?
Yes. Prefix with a minus sign and every base in the result carries it too.
What does the bit count mean?
How many bits the magnitude occupies — 255 needs 8, 256 needs 9. Useful when picking a data type size or designing a bitmask.

Related tools

Hash Generator (MD5 / SHA)

MD5, SHA-1/256/384/512 from text.

Base64 Encode / Decode

Encode and decode Base64, UTF-8 safe.

Color Converter

HEX / RGB / HSL with a color picker.

Timestamp Converter

Unix timestamp ↔ date & time (seconds & milliseconds).