Toolkitbar

Number Base Converter — Binary, Octal, Decimal, Hex

One number, all four bases, with no rounding at any width.

Options

Runs on your device What you paste is processed by your own browser. It is never sent to a server, and it is not stored anywhere after you leave the page.

Short answer

Numbers can be converted between binary, octal, decimal and hexadecimal for free in a web browser. The input base is detected from a 0x, 0b or 0o prefix or chosen explicitly, and each value is shown in all four bases at once. Conversion uses arbitrary-precision integers rather than floating point, so a full 64-bit register value converts exactly instead of losing its low digits.

At a glance

AcceptsOne integer per line, any of the four bases
ProducesBinary, octal, decimal and hexadecimal
ProcessingIn your browser
PriceFree, no limits
AccountNot required

Showing all four bases at once rather than asking for a target base is deliberate: the conversion is instant and the question "what is this in hex" is very often followed by "and in binary". One table answers both.

The arbitrary-precision arithmetic is the part that matters in practice. A JavaScript number holds 53 bits exactly, so a 64-bit hex dump converted through ordinary floating point comes back with its last few digits quietly wrong — the kind of error that looks like a plausible answer and is not. These conversions carry every digit.

How to use it

  1. 1

    Paste your numbers

    One per line. 0xFF, 0b1011 and 255 all work; underscores and spaces inside a number are ignored.

  2. 2

    Set the input base if needed

    Automatic reads the prefix and falls back to decimal. Choose a base explicitly for digits with no prefix.

  3. 3

    Convert

    Each value comes back as binary, octal, decimal and hexadecimal together.

  4. 4

    Copy what you need

    Copy the table to the clipboard, or download it as a text file.

Frequently asked questions

Does it handle 64-bit values exactly?

Yes. Conversion uses arbitrary-precision integers, so a value far beyond the 53 bits a double holds exactly converts with every digit intact.

Which prefixes are recognised?

0x for hexadecimal, 0b for binary and 0o for octal, in either case. With an explicit base selected the matching prefix is still accepted and ignored.

Are negative numbers supported?

Yes, written with a leading minus. Note this is a signed value, not a two's-complement bit pattern — if you need the latter, convert the unsigned pattern you actually hold.

Can it convert fractions, like 0.101 in binary?

No. These are integer conversions. A binary fraction needs a different treatment, and quietly rounding one would be worse than declining.

Related tools

Browse all maths tools →