❯serpapisget_key()

$ man hexadecimal-decoder

Hexadecimal Decoder

NAME

hexadecimal-decoder — Decode hex to text or encode text to hex, with a hex dump, an ASCII gutter, and big- and little-endian integer readings of the leading bytes.

SYNOPSIS

# What is a hexadecimal decoder?
A hexadecimal decoder turns a run of hex digits back into the bytes they represent and then into readable text, treating each pair of digits as one byte and decoding the result as UTF-8.

WHY HERE

Number-base and data utilities for developers working with APIs.

./hexadecimal-decoder --interactive
0x prefixes, spaces, colons and line breaks are all ignored.
Bytes12
Hex digits24
Base64SGV4IOKGkiB0ZXh0
Leading bytes asBig-endianLittle-endian
8-bit7272
16-bit1853325928
32-bit1214609440544761160
64-bit52167078260133442882347086661578941768
OffsetBytesASCII
0000000048 65 78 20 e2 86 92 20 74 65 78 74Hex ... text

Decoding assumes UTF-8. Replacement characters do not mean the hex is wrong — they mean the bytes are not UTF-8 text. Check the Latin-1 reading and the dump before concluding anything.

USAGE

  1. 01 → Paste the hex

    Spaces, commas, 0x prefixes and line breaks are all ignored, so a copied dump works as-is. An odd number of digits means a nibble was lost — the tool warns you rather than silently shifting a byte.

  2. 02 → Read the text output

    The bytes are decoded as UTF-8. Replacement characters mean the data is not UTF-8 text: it may be binary, or Latin-1, or UTF-16, and the Latin-1 reading below is the usual next guess.

  3. 03 → Use the dump for structure

    The dump shows sixteen bytes per row with offsets and a printable-ASCII gutter. File signatures live in the first few bytes: 89 50 4E 47 is a PNG, 25 50 44 46 is a PDF, FF D8 FF is a JPEG.

  4. 04 → Check the byte order for numbers

    If the hex is a number rather than text, read the integer panel. x86 and ARM write numbers little-endian, so 01 00 00 00 is 1, not 16,777,216. Getting this backwards is the most common hex mistake.

DESCRIPTION

Hexadecimal is base 16: the digits 0-9 then a-f, giving sixteen values per digit. One byte holds 256 values, and 256 is 16 squared, so exactly two hex digits describe one byte with nothing left over. That tidy fit is the whole reason hex exists in computing — binary is too long to read and decimal does not line up with byte boundaries, while hex lets you read a byte at a glance and see its two nibbles separately.

Decoding hex to text is therefore two steps. Pair the digits into bytes, then decide what encoding those bytes are in. This decoder assumes UTF-8, which is correct for essentially all modern text. If the result is full of replacement characters, the bytes are not UTF-8 text, and there are three common reasons: the data is a binary file rather than text, the data is Latin-1 (where every byte is one character, so 0xE9 is é rather than the start of a multi-byte sequence), or the data is UTF-16 and you will see a zero byte between every letter.

When the hex is a number rather than text, byte order decides the answer. A 32-bit value written 78 56 34 12 in a memory dump from any x86 or ARM machine is 0x12345678, because those processors store the least significant byte first. The same four bytes in a network packet or a PNG chunk header are big-endian and mean 0x78563412. The integer panel shows both so you can tell which reading is plausible — one of the two is usually an obviously sensible number and the other is astronomically large.

A hex dump earns its layout. Offsets on the left tell you how far into the data you are, the gap after the eighth byte lets you count without losing your place, and the printable-ASCII gutter on the right is how you spot embedded strings in binary data. Reading a file header this way is faster than any file-type detector: the first four bytes are nearly always a signature.

FAQ

## How do I convert hex to text?

Split the hex into pairs of digits, convert each pair to its byte value, then decode those bytes with a character encoding. 48 65 78 is 72, 101, 120, which in UTF-8 and ASCII alike is 'Hex'. Anything above 0x7F needs the full UTF-8 rules, because it is part of a multi-byte sequence.

## Why does my hex decode to question marks or boxes?

Because the bytes are not valid UTF-8. Try the Latin-1 reading, which maps every byte to one character; if that gives sensible text with odd accents, the source was Latin-1 or Windows-1252. If you see a zero byte between every letter, it is UTF-16. If nothing reads as text, the data is binary.

## What does the 0x prefix mean?

It is a marker that the digits after it are hexadecimal, borrowed from C and now near-universal. It is not part of the value: 0x41 and 41 as hex are the same byte, 65 in decimal. This decoder strips the prefix wherever it appears.

## How many characters is one byte in hex?

Two. One hex digit covers four bits, called a nibble, so two digits cover eight bits. That is why a correct hex string always has an even number of digits, and why an odd count means something was truncated.

## Is hexadecimal the same as binary?

They describe the same bits in different notation. 0xF is 1111 and 0xA0 is 10100000. Hex is four times shorter to write and maps cleanly onto bytes, which is why dumps, colour codes, MAC addresses and memory addresses all use it rather than base 2.