Command Palette

Search for a command to run...

NU

Number Base Converter

Convert integers between binary, octal, decimal, hexadecimal, and any base from 2 to 36 with exact BigInt precision and live bit and byte counts

Read input as:
To
FF

255 (base 10) = FF (base 16)

Common:

255 in every common base

BasePrefixValue
Binary (2)0b11111111
Octal (8)0o377
Decimal (10) - 255
Hexadecimal (16)0xFF

Bit length

8

Significant bits in the magnitude

Byte length

1

Bytes needed to store the value

Hex digits

2

Two hex digits per byte

Binary, grouped in nibbles

Each group of four bits maps to exactly one hexadecimal digit.

1111 1111

Hex alignment: F F

Category:converters
Mode:Offline
Version:1.0.0
Access:Free

What is a Number Base Converter?

Number Base Converter interface on Toolz.dev - Convert integers between binary, octal, decimal, hexadecimal, and any base from 2 to 36 with exact BigInt precision and live bit and byte counts

A Number Base Converter rewrites the same integer in a different positional notation. The value does not change - 255, 0xFF, 0o377, and 0b11111111 are four spellings of one quantity - only the radix used to write it down changes. This tool converts between any two bases from 2 to 36, with binary, octal, decimal, and hexadecimal treated as first-class citizens because those are the four you meet in code.

Conversion works digit by digit. Reading a number in base b means accumulating `value = value * b + digit` across the input; writing it back out in base c means repeatedly dividing by c and collecting remainders. This tool performs both halves in BigInt arithmetic, so a 64-bit hash, a 256-bit key, or a 500-digit decimal is converted exactly. Nothing is routed through a JavaScript number, which would silently lose precision above 2^53.

Alongside the conversion you get the measurements that usually prompt the question in the first place: how many significant bits the value occupies, how many bytes it needs, and the binary form grouped into nibbles so you can read it against a hex digit. Negative values are supported, common literal prefixes (0x, 0b, 0o) are accepted, and underscores or spaces can be used as digit separators. Everything runs in your browser.

A good test for any number base converter online is the largest unsigned 64-bit value. Type 18446744073709551615 with the source set to Decimal and the target to Base 36. The To box shows 3W5E11264SGSF, and the all-bases table lists FFFFFFFFFFFFFFFF in hexadecimal and 64 ones in binary, with a bit length of 64 and a byte length of 8. A base number converter that routes the value through a floating-point number would get the low digits wrong here; this number base converter calculator does not.

Arithmetic here uses arbitrary-precision integers rather than JavaScript numbers, which is the difference between a correct answer and a plausible one. A standard double loses precision above 9007199254740991, so a 64-bit hexadecimal value converted through ordinary floating point comes back subtly wrong in its lower digits, and nothing warns you. Two scope notes. This converts integers, so fractional values in a base other than ten are outside what it does. And negatives are shown with a minus sign rather than as a two's complement bit pattern, so a value read from a register or a memory dump needs interpreting according to its width before conversion rather than after.

How to use the Number Base Converter?

1

Enter your number

Type or paste the value. Prefixes such as 0x1F, 0b1010, and 0o755 are accepted, and underscores or spaces can be used as separators - 1010_1111 works exactly like 10101111.

2

Choose the source base

Tell the converter how the number should be read: base 2, 8, 10, 16, or anything else between 2 and 36. Any character that is not a legal digit for that base is flagged by name.

3

Choose the target base

Pick the base you want out. The result updates as you type, and the all-bases panel simultaneously shows binary, octal, decimal, and hexadecimal so you rarely need a second conversion.

4

Read the extras and copy

Check the bit length, byte length, and nibble-grouped binary, then copy either the bare result or the full expression such as "255 (base 10) = FF (base 16)".

Key Features

Any base from 2 to 36

Binary, octal, decimal, and hexadecimal get dedicated buttons, but every radix from 2 to 36 is selectable - including base 32 and base 36, which use the full 0-9 A-Z digit alphabet.

Exact BigInt arithmetic

Values are parsed digit by digit into a BigInt, never through parseInt or Number. A 256-bit key or a 500-digit decimal converts with zero precision loss, where most converters break above 2^53.

All bases at once

One input, four outputs. Binary, octal, decimal, and hexadecimal are all shown live, plus your chosen custom base, so you can cross-check a value without running the conversion four times.

Bit length, byte length, and nibbles

See how many significant bits the value occupies, how many bytes it needs, and the binary form padded and grouped in fours so each nibble lines up with one hexadecimal digit.

Frequently Asked Questions

Divide the number by 2 repeatedly and read the remainders from last to first. 42 gives remainders 0, 1, 0, 1, 0, 1 which read upward as 101010. The converter does this in BigInt arithmetic, so it stays exact for numbers far beyond what a calculator can hold. Enter 42, set the source base to 10 and the target base to 2.

Comments

0 comments

0/2000 characters

No comments yet. Be the first to share your thoughts!

number base converternumber base converter onlinebase number converternumber converter basenumber base converter calculatordecimal to binaryhex to decimalbinary to hexdecimal to hex converteroctal converterradix converterbase 36 converterbinary to decimalconvert number bases