Skip to content
AZ Tools

Number Base Converter

Type a number in binary, octal, decimal, or hexadecimal and instantly read it in all four notations. Conversion uses arbitrary-precision integers (BigInt), so a 64-bit ID, a 256-bit hash, or any other enormous value converts exactly — unlike converters built on floating point, which silently corrupt integers above 2^53. Everything runs in your browser: nothing is sent to a server, and your input is saved locally so it survives a page reload. Each notation exposes different structure, which is why base conversion is everyday work in programming. One hexadecimal digit encodes exactly four bits, so hex is compact shorthand for binary — FF is 11111111, and a byte is always two hex digits — which is why memory addresses, color codes, and MAC addresses use it. Octal groups bits in threes and survives mainly in Unix file permissions (chmod 755). This tool converts plain non-negative integers: there is no fixed bit width, so it does not interpret two's-complement values (FF here means 255, not −1).

Binary
Octal
Decimal
Hexadecimal

How to use

  1. Type or paste a number into the input — digits only, without a 0x or 0b prefix.
  2. Select the base the number is written in: binary (2), octal (8), decimal (10), or hexadecimal (16).
  3. Read the result in all four bases; the outputs update as you type.
  4. Copy any result with its Copy button.
  5. If an error appears, the input contains a digit that doesn't exist in the selected base (e.g. '8' in octal).

Frequently asked questions

How large can the number be?
Arbitrarily large. Conversion uses big integers (BigInt), so a 64-bit ID, a 256-bit hash, or something far larger converts exactly. Ordinary floating-point converters lose precision above 2^53 (about 9×10^15); this one never rounds.
Are negative numbers or fractions supported?
No — the tool converts non-negative whole numbers only. Negative values in real hardware depend on a declared bit width (in two's complement, FF is −1 as an 8-bit signed value but 255 unsigned), so without a width there is no single correct answer. Convert the magnitude here and apply the sign or width interpretation yourself.
Do I need to type a 0x or 0b prefix?
No — leave prefixes off. The input accepts only digits valid for the base you pick from the dropdown, so '0x1F' is rejected (the 'x' isn't a digit). Enter '1F' and select Hexadecimal instead.
Why do programmers use hexadecimal and octal at all?
Because they map cleanly onto bits. One hex digit is exactly 4 bits and two hex digits are one byte, which makes hex ideal for memory addresses, byte dumps, and #RRGGBB color codes. One octal digit is 3 bits, matching the rwx permission triplets in Unix (chmod 755).
Why is my input marked invalid?
It contains a character outside the selected base's digit set — for example '2' in binary or 'G' in hex. Hex digits may be upper- or lower-case and surrounding whitespace is ignored, but separators such as commas, spaces, or underscores inside the number are not accepted.

Guides on this topic

Related tools