Encoding / LOCAL TOOL

Number Base Converter & Bit Inspector

Inspect binary, octal, decimal, hexadecimal, signed values, byte order, bitwise operations, floats, and characters.

Runs locally — input is never uploaded
Prefix binary, octal, or hexadecimal
Bit width
Decimal interpretation
Primary byte order
Shift / rotate by
ResultReady when you are
Bit patternClick a bit to flip it

WHAT IT DOES

Read the word, flip a bit, and see what it is in every other reading.

Read an integer as binary, octal, decimal, and hexadecimal across an explicit 8-, 16-, 32-, or 64-bit width. The same result exposes unsigned and two's-complement readings, big- and little-endian byte order, shifts and rotates, an optional second operand for AND, OR, and XOR, the IEEE 754 float the bits would be, and the characters they would spell. Every bit is a control: click one to flip it and the whole reading follows.

Why use it?

Use it to inspect a fixed-width word from a protocol, register, or binary file and separate its bits from their signed, unsigned, or floating-point interpretation.

How to use this tool

  1. Set width and signedness, enter a decimal value or prefixed bit pattern, and inspect it.
  2. For example, 0xff at 8 bits reads as unsigned 255 and signed -1. At a larger width the same written value no longer has its sign bit set.
  3. Review byte order separately from numeric value; use bit toggles or the optional operand to investigate masks and operations.
  4. A float reading reinterprets the same bits at 32 or 64 bits. It does not numerically convert the integer into a floating-point value.

Details and limitations

  • A 0b, 0o, or 0x prefix marks input as a bit pattern, while unprefixed decimal input is range-checked using the selected signedness.
  • All calculations use BigInt so 64-bit values remain exact instead of passing through JavaScript's limited floating-point integer range.
  • Endianness reorders bytes only; it does not reverse individual bits or change the underlying numeric bit pattern.
  • The bit grid is drawn from the value in the field, and flipping a cell writes the whole word back into that field as hex, so the value stays copyable, editable, and undoable rather than living somewhere the grid alone knows about.
  • Both right shifts are shown because they differ: the logical shift brings in zeros and the arithmetic one carries the sign, and which of the two a language gives you depends on the type rather than the operator. Shift and rotate amounts are taken modulo the selected width.
  • The float reading interprets the same bits as IEEE 754 binary32 or binary64 and is offered only at those two widths. The byte-swapped value is shown beside it, because a float read from the wrong end is not visibly wrong, only different.
  • Changing width, signedness, byte order, or a bit recalculates a reading that is already on screen. Before the first run those controls only set the tool up, and none of them counts as another use of it.

COMMON QUESTIONS

Base & Bits questions

Why does 0xFF read as minus one in signed 8-bit mode?
Its highest bit is set, so the 8-bit two's-complement interpretation subtracts 256 from the unsigned value 255.
Does little-endian reverse every bit?
No. It reverses byte order. The order of bits within each displayed byte is unchanged.
Are 64-bit decimal values exact?
Yes. Parsing and conversion use BigInt throughout, including values beyond JavaScript's safe Number range.
What does clicking a bit do?
It flips that one bit and rewrites the value in the input field as a full-width hexadecimal word, then re-reads it. Nothing else changes, so the field remains the single place the value lives and you can still edit, copy, or retype it by hand.
Why are there two right shifts?
A logical right shift brings in zeros and an arithmetic one repeats the sign bit. C gives you one or the other depending on whether the type is signed, Java spells them >> and >>>, and JavaScript's >>> is the logical one. Both are shown so you can see which result you are actually expecting.
Can it read a hex word as a float?
Yes, at 32 and 64 bits, as IEEE 754 binary32 and binary64, with the sign, exponent, and mantissa broken out and the value classified as normal, subnormal, zero, infinity, or NaN. The byte-swapped reading is shown beside it. There is no float at 8 or 16 bits, so that section is absent rather than empty.
Why does my 32-bit value read as a word like GIF8?
Because every one of its bytes is printable ASCII, which usually means the value is a file magic number or a four-character code rather than a quantity. A value inside the Unicode range is also shown as a code point with its UTF-8 bytes.