Skip to content

Base Converter

Enter a number, specify its base, and instantly get its equivalent in binary, octal, decimal, hexadecimal and a custom base. Large numbers are converted without losing any digits.

It works in your browser. We do not store or send anything you type.Free · No sign-up required

Workspace · Base Converter

Runs in your browser · 100% local

Acepta signo negativo y prefijos 0x, 0b y 0o cuando la base coincide.

Binario (base 2)

11111111

Octal (base 8)

377

Decimal (base 10)

255

Hexadecimal (base 16)

FF

Base 36 (base 36)

73

3 dígitos de entrada·3 dígitos decimales

La conversión usa BigInt, así que no pierde precisión con números grandes. Los valores negativos se representan con signo, no en complemento a dos.

Files are processed in your browser; if you are signed in with history enabled, text results appear in your history.
Instructions

How to use it

01

Write the number and state the base in which it is expressed.

02

Take a look at the five options and choose the custom base if you need a different one.

03

Copy the result you’re interested in, or all the values at once.

Examples

Examples

Decimal to hexadecimal

255 in base 10 is equivalent to FF in base 16 and to 11111111 in binary.

Hexadecimal prefix

0xFF is interpreted correctly if you select base 16; the 0x prefix is removed before conversion.

Reference guide

What you need to know

The conversion is carried out using BigInt, not Number, to avoid loss of precision beyond 2^53. Valid digits range from 0 to 9 and from A to Z, up to base 36. Negative values are represented by a minus sign, not in two’s complement.

The prefixes 0x, 0b and 0o are only accepted when the selected base matches. The tool supports up to 200 digits of input; beyond that, the result is no longer practical to copy, and it is advisable to use a specialised library.

Frequently asked questions

Frequently Asked Questions

Because the `Number` type loses precision with large integers. `BigInt` allows you to convert numbers with many digits without rounding.

Related tools

Other tools that can help with similar tasks.

More at Converters→
Binary and Hexadecimal Number Base Converter · ByTooly