Convert

Hex ↔ Text — Read the Bytes Directly

Hexadecimal gives every byte a compact two-character representation, which makes it the standard way to look at data that is not meaningfully text. Converting in both directions lets you see exactly which bytes are present rather than how some viewer chose to display them, and that distinction is the point.

When it helps

For the problems that only exist at byte level. A file with an unexpected byte-order mark at the start that breaks a parser and is invisible in every editor. Text that looks identical to another string and does not compare equal, because one contains a non-breaking space. A file whose extension says one thing and whose leading bytes say another. In each case the characters look right and the bytes are wrong, and only the bytes settle it.

Worth running automatically

Byte-level surprises tend to arrive through a pipeline rather than being typed, which is what makes them worth catching automatically. A file uploaded by a customer, an export from a system that changed its encoding, a build step that rewrote line endings. Where an endpoint serves generated content, verifying the response body rather than the status code is what notices that the encoding changed — the request still succeeds, and the content is now subtly different.

What you get out of it

Ground truth about content when a display layer is lying to you. Most of its use is confirming that two things which look identical really are, or explaining why they are not.

Also in Convert