Binary/Hex/Octal Converter — Base 2/8/10/16

Type in any field—binary, octal, decimal, or hex—and the rest update instantly. 100% client-side for privacy.

Number Inputs

Digits: 0–1. Spaces and 0b prefix allowed.
Digits: 0–7. 0o prefix allowed.
Digits: 0–9. You can include a minus sign.
Digits: 0–9, A–F. 0x prefix allowed.

About This Base Converter

This tool converts integers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Enter a value in any box—including optional prefixes—and the others update automatically. Negative numbers are supported. For very large values, we use JavaScript BigInt.

  • Toggle Show prefixes to display 0b/0o/0x in the outputs.
  • Turn on Group binary to insert a space every 4 bits (nibbles) for easier reading.
  • Uppercase hex gives A–F; turn it off for lowercase.

Learn About Binary, Octal, Decimal, and Hexadecimal

This base converter helps you translate numbers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Whether you’re a student reviewing number systems, a developer reading bitmasks, or a hardware enthusiast examining registers, this binary to hex converter and octal to decimal tool gives instant, accurate results—right in your browser.

Why Different Bases Exist

Computers store information in binary, where each digit (bit) is 0 or 1. Engineers often group bits into nibbles (4 bits) or bytes (8 bits) to make them easier to read. That’s why hex (0–9 and A–F) is so popular: each hex digit maps exactly to 4 binary digits. Octal (0–7) is also compact—each octal digit maps to 3 binary digits—so you’ll see it in Unix permissions and some legacy documentation. Decimal is the human default for everyday math.

Quick Mental Rules

  • Binary → Hex: Split the binary string into groups of four, then translate each group to a hex digit. Example: 1111 0001F1.
  • Binary → Octal: Group by threes. Example: 111 00171.
  • Hex → Binary: Replace each hex digit with its 4-bit equivalent. Example: 0x2A0010 1010.
  • Powers of Two: 210 = 1024, 216 = 65,536, 232 ≈ 4.29 billion—handy for estimating sizes.

How to Use This Converter

Type a value into any input—binary, octal, decimal, or hex—and the others update instantly. You can include common prefixes (0b, 0o, 0x), toggle uppercase hex, and group binary in 4-bit blocks for readability. Negative integers are supported, and the tool uses BigInt to handle very large values.

Common Pitfalls to Avoid

  • Digit mix-ups: Hex allows A–F; octal does not allow 8 or 9.
  • Leading zeros: They do not change the value, but can be useful for alignment.
  • Sign placement: Put the minus sign before the prefix (e.g., -0xFF).

Where Base Conversions Show Up

You’ll encounter base conversions when reading microcontroller datasheets, configuring GPIO bitmasks, parsing color codes (e.g., #FF6600 is hex), analyzing file headers, or interpreting network packets. System administrators also meet octal in POSIX file permissions (e.g., 0755).

Privacy and Accessibility

Your inputs never leave your device—this converter runs entirely client-side for privacy. It supports keyboard navigation, copy buttons for quick sharing, and optional formatting to make long binary strings easier to read.

Try quick checks like binary to decimal, decimal to hex, or octal to binary using the examples above, and use the options bar to match your preferred display style.

Explore more tools