Binary / Decimal / Hex / Octal Converter

Convert between Binary, Decimal, Hex & Octal with interactive bits.

How to use

  1. Type or paste a number into any field—Decimal, Binary, Hexadecimal, or Octal—and the other three bases update instantly.
  2. Enable 4-bit spacing to group binary digits into readable nibbles, or pick an example value from the top bar.
  3. Click any bit in the 8-bit, 16-bit, or 32-bit inspector to flip 0 ↔ 1 and see the converted values live.

Questions

Does it support large numbers and negative numbers?
Yes. Conversions use JavaScript BigInt for arbitrary-precision integers, and negative numbers show both signed values and two’s complement bit representations.
Can I paste values with 0x, 0b, or 0o prefixes?
Yes. Prefixes such as 0x, 0b, 0o, spaces, and underscores are automatically handled when you type or paste.
How does the interactive bit toggle work?
Select 8-bit, 16-bit, or 32-bit mode and click any bit position to flip it between 0 and 1—every number base updates immediately.

Number Base Reference Chart & Bitwise Guide

Quickly look up 0–15 conversions across Decimal, Binary, Hexadecimal, and Octal, plus signed vs unsigned integer ranges and bitwise shift behavior.

Quick Base Chart (0 – 7)

3-Bit / Octal

Values 0 through 7 map 1-to-1 across Decimal, Octal, and Hexadecimal, and fit inside 3 binary bits (one octal digit).

Decimal4-Bit BinaryHexOctal
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177

Quick Base Chart (8 – 15)

4-Bit Nibble

Values 8 through 15 use all 4 binary bits (a nibble) and correspond to digits 8–9 and letters A–F in Hexadecimal.

Decimal4-Bit BinaryHexOctal
81000810
91001911
101010A12
111011B13
121100C14
131101D15
141110E16
151111F17

Signed vs Unsigned & Two’s Complement

8 / 16 / 32-bit

Unsigned integers store only non-negative values (0 to 2ⁿ − 1). Signed two’s complement integers use the most significant bit as the sign bit—invert all bits and add 1 to negate a number.

WidthUnsigned RangeSigned (Two’s Comp.)
8-bit0 to 255−128 to +127
16-bit0 to 65,535−32,768 to +32,767
32-bit0 to 4,294,967,295−2,147,483,648 to +2,147,483,647

Bitwise Operations Quick Guide

Shifts & Invert

Bitwise shifts multiply or divide integers by powers of 2, while bitwise NOT (~) flips every 0 bit to 1 and every 1 bit to 0 within the selected bit width.

OperationEffect on BitsExample (42 / 0010 1010)
<< 1 (Left Shift)Moves bits left (× 2)84 (0101 0100)
>> 1 (Right Shift)Moves bits right (÷ 2)21 (0001 0101)
~NOT (Invert)Flips all bits in width213 (1101 0101, 8-bit)

About Binary / Decimal / Hex / Octal Converter

PlainTool Binary / Decimal / Hex / Octal Converter lets you translate integers between Base 2 (Binary), Base 10 (Decimal), Base 16 (Hexadecimal), and Base 8 (Octal) instantaneously in your browser. Edit any of the four fields—or paste values with 0b, 0x, or 0o prefixes, spaces, or underscores—and every other base updates in real time using arbitrary-precision BigInt math.

Below the converter, the Interactive Bit Toggle & Binary Inspector lets you switch between 8-bit, 16-bit, and 32-bit views, flip individual bits between 0 and 1 with a click, view two’s complement hexadecimal representations for negative numbers, and check printable ASCII characters.

Common use cases

  • Computer science students learning binary arithmetic, octal permissions, hexadecimal memory addresses, and two’s complement.
  • Software developers and embedded engineers debugging bitmasks, flags, registers, and hex color or byte values.
  • Digital electronics learners pairing binary/hex conversions with logic gate circuits.

Practical tips

  • Binary values are automatically grouped into 4-bit nibbles so each group maps directly to a single hexadecimal digit.
  • Click any bit square in the 8-bit, 16-bit, or 32-bit inspector to toggle it and watch Decimal, Hex, and Octal update live.
  • Use prefixes like 0xFF or 0b101010 directly when pasting values from code.

Limits & compatibility: Supports arbitrary-precision signed integers (including negative numbers). Fractional floating-point bases (such as 0.5 in binary) are not converted.