ModernCalcs

Hex to Text Converter

Decode hexadecimal byte strings into readable UTF-8 text, or encode text back into hex.

Hello, World!

Hex to Text: Decode Raw Bytes Into Readable Content

Hexadecimal is how raw bytes are usually displayed for human inspection — network packet captures, binary file headers, and low-level protocol dumps all show up as hex. This tool converts hex byte strings into UTF-8 text (and back), handling the common spacing and prefix variations you'll actually encounter.

Formula
Hex Byte (2 digits, 0x00-0xFF) -> Decimal -> UTF-8 Character

Example: 48 -> 72 (decimal) -> 'H'.

Common Hex Formats You'll See in the Wild

Different tools format hex dumps differently: some use spaces between bytes (48 65 6c), some run them together (48656c), and some prefix each byte with 0x (0x48 0x65 0x6c). This tool strips all of those variations before decoding, so you can paste directly from a packet capture, a debugger, or a log line.

Why UTF-8 Decoding Matters

A naive hex-to-ASCII converter breaks on any character outside the basic 0-127 range — emoji, accented letters, and most non-English scripts. Decoding with UTF-8 correctly reassembles multi-byte sequences, so hex representing 'café' or an emoji decodes to the right characters instead of garbage.

When Bytes Aren't Valid Text

Not every byte sequence is meant to be text — binary file headers, for example, are hex by design and won't decode into anything readable. This tool uses non-fatal UTF-8 decoding, so invalid sequences show up as the replacement character (�) instead of crashing, letting you see which parts of a mixed payload are actually text.

Practical Examples

Decoding a Packet Capture Payload

Turning a hex dump into readable content.

  • 1.Input: 47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31
  • 2.Output: GET / HTTP/1.1

Encoding Text for a Binary Protocol

Preparing a hex payload to send.

  • 1.Input text: PING
  • 2.Output (spaced, uppercase): 50 49 4E 47

Accepted Hex Input Variations

  • Spaced: 48 65 6c 6c 6f
  • Unspaced: 48656c6c6f
  • 0x-prefixed: 0x48 0x65 0x6c
  • Comma/colon-separated: 48,65,6c or 48:65:6c

Good Use Cases

  • Debugging raw network payloads or packet captures
  • Inspecting binary file magic bytes/headers
  • Converting between hex and text for protocol testing
  • Manually decoding hex-encoded API response fields

Frequently Asked Questions

What hex formats does this accept?

Space-separated (48 65 6c), unspaced (48656c), comma or colon-separated (48,65,6c or 48:65:6c), and 0x-prefixed bytes (0x48 0x65) — the parser strips separators and 0x prefixes automatically before decoding.

Why do I need an even number of hex digits?

Each byte is represented by exactly 2 hex digits (00-FF). An odd digit count means a byte is incomplete, so the tool flags it as an error rather than guessing.

What character encoding is used to decode text?

UTF-8, the dominant encoding on the modern web. This means multi-byte sequences for emoji and non-Latin scripts decode correctly, not just plain ASCII.

What happens if the hex bytes aren't valid UTF-8?

The decoder uses non-fatal mode, so invalid byte sequences are replaced with the Unicode replacement character (�) instead of throwing an error, so you can still see the parts that did decode correctly.

Can I convert text to hex too?

Yes — switch to 'Text → Hex' mode, type or paste any text, and choose whether you want uppercase letters and space separation in the output.

Where is hex-to-text useful in real development work?

Reading raw byte dumps from network captures, debugging binary protocol payloads, decoding hex-encoded API responses, or manually inspecting file headers/magic bytes.