Base Converter

What Is the Number Base Converter?

Convert whole numbers between binary, octal, decimal and hexadecimal. Type in any of the four fields and the other three update at once; each result has a copy button.

Why Use This Tool?

Working with different number bases is common in programming — hex for colors and memory addresses, binary for bitwise operations, octal for file permissions. This tool converts between all four major bases instantly.

How to Use This Number Base Converter

  1. Enter your number — Type or paste the number you want to convert into the input field.
  2. Or type in another base — Each of the four fields (binary, octal, decimal, hexadecimal) accepts input, so there is no base to select.
  3. Read the conversions — All other base representations update instantly. Copy any result with one click.
  4. Mind the limits — Whole, non-negative numbers up to 9,007,199,254,740,991 convert exactly; fractions are dropped and negative numbers are not converted (see the worked example).

Worked example: exact at any size, and honest about what it refuses

Until October 13, 2026 the converter used JavaScript numbers (IEEE 754 doubles), so values above Number.MAX_SAFE_INTEGER, 2⁵³ − 1 = 9,007,199,254,740,991, came out rounded, fractions and exponents were cut silently and negatives were left blank. It now does all arithmetic with BigInt, which has no size limit. We typed the inputs below into the tool in Chromium and compared every field with Python's int(): all matched (test script: _ops/checks/number-base/).

You type (decimal unless noted)Old hex outputNow
255FFFF
0x1F (in the hex field)1F1F (prefixes 0x, 0b, 0o and separators _ are read)
12.75C (fraction dropped silently)Refused with a message: whole numbers only
1e31Refused with a message: type 1000
−255(blank)-FF, or FF / FFFF… as 8- to 64-bit two's complement
9007199254740993 (2⁵³ + 1)20000000000000 (off by one)20000000000001
18446744073709551615 (2⁶⁴ − 1)10000000000000000FFFFFFFFFFFFFFFF
123456789012345678901234567890(rounded)exact, 97 bits
"102" typed in binaryignored"2" is not a binary digit

Frequently Asked Questions

When do I need hex numbers?
Hexadecimal is used for CSS colors (#FF6B6B), memory addresses, Unicode code points (U+1F600), and byte-level data representation.
How do I read binary numbers?
Binary uses only 0 and 1. Each position represents a power of 2 from right to left: 1, 2, 4, 8, 16... So binary 1010 = 8 + 2 = decimal 10.
What's the relationship between hex and binary?
Each hex digit represents exactly 4 binary digits: F = 1111, A = 1010, 0 = 0000. This makes hex a compact way to write binary data.
Why do computers use binary?+
Digital circuits have two states — on (1) and off (0) — making binary the natural language of hardware. All other number bases are human conveniences for reading and writing binary more compactly.
What is hexadecimal used for in programming?+
Hexadecimal is used for color codes (CSS, design tools), memory addresses, byte representations, MAC addresses, and anywhere compact binary representation is needed. Each hex digit maps to exactly 4 binary digits, making conversion straightforward.
How do I convert binary to decimal manually?+
Multiply each binary digit by its positional power of 2, then sum the results. For example, 1011 = (1×8) + (0×4) + (1×2) + (1×1) = 11 in decimal.
How does the converter handle negative numbers?+
By default it writes them with a minus sign (−255 is -FF). Choose 8, 16, 32 or 64 bits under the fields to see the two's-complement pattern a computer stores instead (−5 is FB in 8 bits, FFFFFFFB in 32 bits); values that do not fit the width are flagged.
Can it handle fractional numbers?+
No, and it says so: typing 12.75 or 1e3 shows a message instead of a silently cut value. Fractions in another base are often infinite (0.1 in decimal repeats forever in binary), so this converter sticks to whole numbers, of any size.

📖 Learn More

Related Article How to Convert Between Number Bases →

Built by Derek Giordano · Part of Ultimate Design Tools

Privacy Policy · Terms of Service