Converters
Calculators
Other Tools
Browse tools
Web tools

Number base converter

Convert a number between binary, octal, decimal, and hexadecimal — type in any field and the other three fill in live.

Never leaves your device No signup Free forever Not stored, not logged

Number

updates automatically

Binary (base 2)

Octal (base 8)

Decimal (base 10)

Hexadecimal (base 16)

More web tools

Related tools you might need next

All web tools

How it works

One step, no account

1

Type a number into any field

Each field only accepts the characters valid for its base — a binary field silently ignores anything that isn't 0 or 1.

2

Read the other three

The remaining fields update instantly, computed with arbitrary-precision integer math so very large numbers stay exact.

FAQ

Common questions

Why does the hexadecimal field accept letters?
Hexadecimal is base 16, so it needs 16 distinct digits. After 0–9 it continues with A–F to represent 10 through 15 — both uppercase and lowercase letters are accepted while typing, and the display is normalized to uppercase.
What happens if I type an invalid character, like "9" in the binary field?
It's dropped as you type rather than accepted and left to produce a wrong answer — each field filters out any character that isn't a valid digit for its base before converting.
Is there a limit to how large a number I can convert?
No practical limit — conversions use JavaScript's BigInt type, which handles arbitrarily large whole numbers exactly, unlike ordinary floating-point numbers that lose precision above 2^53.
Is my data sent anywhere?
No. Every conversion runs entirely in your browser using plain JavaScript — nothing is transmitted, logged, or stored.
ad slot · bottom of content 336×280 / responsive
Related

People who used this also used

Number Base Converter

Our Number Base Converter translates a number between binary, octal, decimal, and hexadecimal instantly. Type into any of the four fields and the other three fill in live, using arbitrary-precision math so large values stay exact.

How to Use the Number Base Converter

1. Type a Number

  • Enter a value in the Binary, Octal, Decimal, or Hexadecimal field
  • Each field only accepts the digits valid for its base
  • Invalid characters are filtered out as you type, not silently misread

2. Read the Other Fields

  • The remaining three fields update instantly
  • No convert button — every field is live

3. Copy or Continue

  • Select and copy any field's value
  • Keep editing any field to explore a different number

Key Features

Supported Bases

  • Binary (base 2): digits 0–1
  • Octal (base 8): digits 0–7
  • Decimal (base 10): digits 0–9
  • Hexadecimal (base 16): digits 0–9 and A–F

Input Handling

  • Per-field character filtering, so a binary field can't accidentally hold a "9"
  • Leading zeros are handled gracefully
  • Empty input clears the other fields instead of showing a stale value

Use Cases

1. Software Development

  • Reading a bitmask, flag value, or color literal written in hex or binary
  • Converting a decimal byte value to its hexadecimal representation for a hex dump or memory address
  • Checking how many bits a given decimal number requires

2. Computer Science Education

  • Practicing manual base conversion and checking the answer
  • Understanding how positional number systems relate to each other
  • Exploring how the same quantity looks completely different across bases

3. Networking & Systems

  • Converting a subnet mask or IP octet between decimal and binary
  • Reading permission bits (octal) alongside their decimal equivalent
  • Translating hex color codes or hex-encoded IDs to decimal for calculations

Technical Features

  • Arbitrary-Precision Math: Uses JavaScript's BigInt type, so numbers far larger than a standard 64-bit integer convert exactly
  • Live Two-Way Sync: Any field can be the source; the other three follow immediately
  • Per-Base Input Filtering: Each field enforces its own valid character set while typing
  • No Crashes on Empty or Partial Input: Clearing a field simply clears the others, rather than throwing an error

Why Use Our Number Base Converter

1. No Manual Math

  • Conversions that are tedious and error-prone by hand happen instantly
  • Works both ways between any pair of the four bases at once

2. Handles Large Numbers Correctly

  • BigInt-based conversion avoids the precision loss ordinary floating-point math hits above 2^53
  • Useful for large bitmasks, hashes, or identifiers, not just small textbook examples

3. Privacy Focused

  • Client-side processing only
  • No numbers are ever transmitted or stored
  • Works entirely in your browser

Understanding Number Bases

What Is a Number Base?

A number base (or radix) defines how many unique digits a positional number system uses before it carries over to the next place value. Decimal (base 10) is the everyday system with digits 0–9. Computers work natively in binary (base 2, digits 0–1) because a transistor or bit has only two states — on or off.

Why Octal and Hexadecimal Exist

Binary numbers get long fast — a single byte is 8 digits, and larger values quickly become hard to read. Octal (base 8) and hexadecimal (base 16) were adopted because they convert to and from binary cleanly: each octal digit represents exactly 3 binary digits, and each hexadecimal digit represents exactly 4. That makes hex in particular a compact, human-friendlier stand-in for binary data — which is why it shows up constantly in color codes, memory addresses, and hash digests.

Common Applications

  1. Color Codes: CSS hex colors like #3B82F6 are just RGB byte values written in base 16
  2. File Permissions: Unix permission modes like 755 are octal, representing three sets of binary read/write/execute flags
  3. Memory Addresses: Debuggers and disassemblers display addresses and offsets in hexadecimal
  4. Bitmasks & Flags: Binary makes it easy to see exactly which individual bits are set

Conversion Approach

Converting between bases mathematically means interpreting a string of digits in its source base to get a single numeric value, then re-expressing that same value using the target base's digit set — the underlying quantity never changes, only how it's written.

Remember: 255 in decimal is the same quantity as FF in hexadecimal, 377 in octal, and 11111111 in binary — converting bases changes the representation, not the value.