Tool · Bytes

Hex converter

One number, written three ways, in both byte orders

Hex converter

Decimal, hex and binary, and the bytes in both orders

Big-endian as written
0001ff0b
Little-endian as stored
0bff0100
Runs in your browser · nothing is sent src/lib/bytes.ts

What it does

Type a number in any of the three boxes (decimal, hex or binary) and the other two follow. Below them, the same number is laid out as bytes, first in the order people write numbers (big-endian), then reversed, the order Pearl writes most numbers into blocks and transactions (little-endian).

How to read it

  • Hexadecimal uses 16 symbols, 0–9 then a–f. Two hex digits make exactly one byte, which is why hashes, keys and raw transactions are always shown in hex.
  • Width pads the number to a fixed number of bytes. A block’s version, time and bits are 4 bytes each; an amount is 8 bytes; a hash is 32.
  • Little-endian puts the smallest byte first. The block height 130,827 is 0x0001ff0b written normally, and 0b ff 01 00 in little-endian bytes.

Pearl specifics

Same as Bitcoin. Every integer field in a Pearl header or transaction (version, time, bits, amounts, output indexes, sequence, locktime) is stored little-endian, and hashes are shown byte-reversed. The byte order page walks through a real header.

Under the hood

Runs entirely in your browser, with BigInt arithmetic from src/lib/bytes.ts, so numbers of any size convert exactly.

Suggested

Up and down arrows move through the results, Enter opens one, Escape closes. Anywhere on the site, slash or Command K opens this search, and the square brackets [ and ] go to the previous and next page.