Number Base Converter

Convert between binary, octal, decimal and hexadecimal with exact BigInt precision.

100% private — everything runs in your browser

How to Use

  1. 1

    Choose the base your number is written in.

  2. 2

    Type the digits — invalid digits are flagged immediately.

  3. 3

    Copy the value you need from the binary, octal, decimal or hex row.

Examples

Decimal → hex

Input

4095

Output

0xfff · binary 111111111111

Hex → decimal

Input

ffff

Output

65535

FAQ

How large can the number be?

Values are parsed as BigInt, so 64-bit IDs and long hashes convert without rounding.

Are negative numbers supported?

Yes, a leading minus sign is preserved in every base.

Does the output include a prefix?

No, the output is plain digits so it can be pasted into code; add 0b, 0o or 0x yourself when you need one.

Related Tools