Why hexadecimal shows up everywhere
Hexadecimal (base 16) is the usual human-readable form for raw bytes. Each byte is two hex digits (00–ff), so a short string stays compact compared with binary while remaining unambiguous about byte boundaries. Network traces, memory dumps, color codes, cryptographic digests, and file signatures almost all speak hex.
Encoding text as hex means: take the bytes of the text under a character encoding (commonly UTF-8), then print each byte as a two-digit hex pair. Decoding reverses that mapping. Hex is not encryption; it is a transparent alphabet for bytes. Anyone with a decoder recovers the original byte sequence instantly.
Encode a sample with from text to hex, then restore it with from hex to text.
Subtools in this family
- From text to hex — encodes each UTF-8 byte of your text as spaced lowercase hex pairs, useful for debugging and wire-style dumps.
- From hex to text — accepts spaced or continuous hex and rebuilds readable text when the bytes form valid text under the decoder’s rules.
Use them together to confirm that a documented dump matches a string, or to turn a pasted capture fragment back into characters when the payload was plain text.
Spacing, case, and prefixes
Implementations differ in cosmetics:
- Case.
4aand4Aare the same byte. Lowercase is common in dumps; uppercase appears in many RFCs. - Spacing. Spaces every two digits improve readability (
48 65 6c 6c 6f). Continuous hex (48656c6c6f) is equally valid if the length is even. - Prefixes. Languages sometimes write
0x48or\x48. Strip prefixes before feeding a pure hex decoder unless the tool documents support for them.
Odd-length hex strings are invalid for whole-byte decoding: you cannot have half a byte without an explicit nibble-oriented format.
UTF-8 bytes versus Unicode code points
Important distinction:
- Hex dumps of text are usually UTF-8 byte sequences. The euro sign
€is three bytese2 82 ac, not a single code-unit value. - Unicode code points are often written as
U+20AC. That is not the same string as the UTF-8 hex dump.
Tool Plaza’s text↔hex pair focuses on byte encoding of text (UTF-8), which matches what you see in protocol analyzers and xxd-style output for strings. If you need code-point lists, use a Unicode-oriented workflow instead.
Everyday uses
Debugging serializers. When JSON or CSV looks wrong, hex reveals invisible characters: c2 a0 (UTF-8 non-breaking space), ef bb bf (UTF-8 BOM), or stray 00 nulls.
Comparing digests and keys. SHA-256 digests and many API secrets are published as hex. Knowing how text becomes hex helps you spot encoding mismatches (UTF-8 vs UTF-16, trimmed newlines).
File magic numbers. PNG files begin with 89 50 4e 47; JPEG with ff d8 ff. Hex views make those signatures obvious even when the file extension lies.
Teaching encoding. Students can convert Hi → 48 69 and connect ASCII tables to on-the-wire bytes.
Hex versus Base64 versus binary
| Representation | Density | Typical use |
|---|---|---|
| Binary digits | Lowest | Bit-flag teaching |
| Hex | Medium | Dumps, digests, colors |
| Base64 | Higher | Embedding bytes in JSON/XML |
Same bytes, different alphabets. Prefer hex when humans must eyeball byte values; prefer Base64 when packing into text protocols (see the base64 hub). Prefer binary when individual bits matter (binary). Decimal ASCII codes (ascii) are a third teaching view for the 0–127 range.
Common failure modes
- Decoding hex that actually represents compressed or encrypted bytes and expecting readable prose.
- Mixing Latin-1 single-byte assumptions with UTF-8 multi-byte text.
- Copying hex from a UI that inserts
:separators (MAC addresses) or-(some GUID formats) without normalizing. - Treating hex as a way to hide passwords in config files—still plaintext to any decoder.
- Truncating digests “to save space” in security contexts.
Limitations and browser support
These converters help you inspect and teach byte encodings. They do not validate semantic document structure, and they do not provide confidentiality. For sensitive material, keep processing local.
Summary
Hexadecimal is the standard lens for looking at bytes. This hub pairs text→hex and hex→text so you can produce dumps and recover text when the bytes are textual. Mind UTF-8 multi-byte characters, keep hex length even, normalize separators, and choose hex, Base64, or binary according to whether you need clarity, density, or bit visibility.