Number Base Converter

Binary, octal, decimal, hex and base 2-36 with two's complement and a bit editor.

Runs locally · nothing uploaded

Two's complement

Click a bit to flip it. Bit numbers are shown under each cell; the dashed cell is the sign bit.

What it does

Type a number into any field (decimal, hexadecimal, binary, octal or a custom base from 2 to 36) and the others update as you type.

  • Any size: conversion uses JavaScript BigInt, so 128-bit keys, 64-bit IDs and 30-digit numbers convert exactly, without the rounding you get with floating-point converters.
  • Paste values as they appear in code: prefixes 0x, 0b and 0o, separators such as 1_000_000, DEAD BEEF or 1,234,567, and a leading minus sign are all understood. A prefix overrides the field, so pasting 0xFF into the decimal box still works.
  • Digit grouping in the output: hex and binary in groups of four, decimal with thousands separators.
  • Two’s complement for 8, 16, 32 and 64 bits, or automatically the smallest width that fits. You see the signed and unsigned interpretation, the padded hex and binary pattern, and the bytes in big-endian and little-endian order. For example, -1 at 8 bits is 0xFF, and 0xFFFFFFFF read as int32 is -1.
  • Bit grid: click any bit to flip it and watch every representation change. The sign bit is marked.
  • Precise errors such as Invalid digit “9” at position 4 for base 8.

How to use

Start typing in any field, or press Example to cycle through sample values. Use Copy next to a field to copy that representation.

Privacy

All conversion happens in your browser. Nothing is uploaded; your last value and settings are remembered on this device.