Binary / Decimal / Hex Converter

Paste a value in any base. Convert instantly, see grouped bits, and toggle signed/unsigned fixed-width views.

How to Use

  1. Type or paste a value in Binary, Decimal, or Hex.
  2. Select the input base (or let Auto detect handle prefixes like 0x).
  3. Use “Bit Width” + “Signed” to view two’s-complement results.
  4. Click “Copy Results” or “Share Link” when ready (URL never changes while typing).
Base Readout
Grouped bits + prefix formatting. Deterministic conversions.
Bits
Bytes
Sign
State
Binary
Grouped by 4 (nibbles) or 8 (bytes) based on your setting.
Decimal
Shows signed or unsigned depending on mode.
Hex
Uppercase hex; optional 0x prefix.
Inputs & Settings
Enter in any base. Outputs update instantly. Share/copy are button-only.
Auto detect supports: 0b, 0x, underscores, spaces.
Controls two’s-complement behavior and display padding.
Allowed: 0/1, optional 0b, underscores/spaces.
Allowed: digits, optional leading -.
Allowed: 0–9, A–F, optional 0x, underscores/spaces.
Affects display only (no math changes).

Show Work (details)
Work shows normalization (strip prefixes/separators) and base-to-integer conversion.

Reference

  • Binary (base 2): digits 0–1
  • Decimal (base 10): digits 0–9
  • Hex (base 16): digits 0–9, A–F
  • Two’s complement: signed integers in fixed-width binary

Tip: Common prefixes are 0b for binary and 0x for hex.

FAQ

Why does 0xFF show as -1 in signed 8-bit?

In 8-bit two’s complement, 11111111 represents -1. Unsigned, it represents 255.

What does “Bit Width: Auto” do?

It uses the minimum bits needed to represent the magnitude (or the parsed binary/hex length), without extra padding.

Are underscores/spaces allowed?

Yes. They’re ignored for parsing and used only for readability.

Tool Info

Last updated:

Updates may include validation edge-cases, formatting options, and additional base views.