Binary / Decimal / Hex Converter

Enter a non-negative integer and its base to instantly see it converted to binary, octal, decimal, and hexadecimal.

Processed locally in your browser. Your data is not uploaded to our servers.

Binary—
Octal—
Decimal—
Hexadecimal—

Examples

DecimalBinaryOctalHex
10101012A
25511111111377FF
40961000000000000100001000

Formula & Methodology

Each base represents numbers using a different number of digit symbols (its "radix"):

binary = base 2 (0–1) · octal = base 8 (0–7) · decimal = base 10 (0–9) · hex = base 16 (0–9, A–F)

How to Use

  1. Choose the base your input value is written in (or leave it on Auto-detect).
  2. Type the value.
  3. All four representations update instantly below.

Frequently Asked Questions

Does this support negative numbers?

No — this tool currently supports non-negative integers only. Negative number and fractional support may be added in a future update.

How large a number can I convert?

The tool uses JavaScript’s BigInt internally, so it can handle arbitrarily large integers without losing precision — unlike using regular floating-point numbers.

What does "Auto-detect" do?

It guesses the base from the format of what you typed — a 0x prefix is treated as hex, 0b as binary, 0o as octal, and plain digits are treated as binary if they only contain 0s and 1s, otherwise decimal.

Last updated: