Skip to main content

hex-to-utf8

A hex-to-UTF-8 converter reads a sequence of hex byte values and decodes them as UTF-8 text β€” the inverse of UTF-8 to hex β€” useful when copying byte values out of a hex editor, packet capture, log line, or stack trace and you need to see the original string. The ZTools Hex-to-UTF-8 tool is forgiving about input formatting (spaces, commas, 0x prefixes, newlines all tolerated), supports lenient mode that substitutes U+FFFD for invalid sequences and reports their location, and is the canonical "what does this hex actually say" debugging tool.

Use cases​

Reading hex from logs​

Logs sometimes dump a hex blob ("48 65 6c 6c 6f"). Decode to "Hello" to confirm what the system actually saw.

Hex editor inspection​

Open a binary file in a hex editor; copy a string-looking region; decode to text to confirm content.

Network packet analysis​

Wireshark shows payload bytes. Decode to see if it is a JSON / SOAP envelope / readable text.

Round-trip verification​

Encoded text β†’ hex β†’ text round-trip should be lossless. Mismatch reveals encoding bugs.

How it works​

  1. Paste hex β€” Any of: space-separated, no separator, 0x-prefixed, comma-separated, newline-separated. Input is stripped of whitespace and prefixes.
  2. Validate β€” Hex string must have even length. Odd lengths trigger an error with the offending position.
  3. Decode UTF-8 β€” Bytes interpret as UTF-8 sequences. Lenient mode substitutes U+FFFD for invalid sequences; strict mode errors.
  4. Inspect β€” Decoded text shown alongside any flagged error positions. Codepoint view available.
  5. Copy β€” Decoded text to clipboard.

Examples​

Input: 48 65 6c 6c 6f

Output: Hello


Input: e2 82 ac

Output: €


Input: f0 9f 9a 80

Output: πŸš€

Frequently asked questions​

My hex decodes to garbage

Likely the encoding is not UTF-8. Try Latin-1 / Windows-1252 / UTF-16 in the encoding selector. Old Windows logs are often cp1252.

What does "U+FFFD" mean in the output?

The Unicode replacement character β€” the lenient decoder inserts it where the byte sequence is invalid UTF-8. Click the marker for the offending byte position.

Can I decode hex that is mixed case?

Yes β€” uppercase, lowercase, mixed all accepted.

What if my input has 0x prefixes?

Stripped automatically. 0x48 0x65 0x6c decodes correctly.

Why does the decoded length differ from the byte count?

UTF-8 encodes some characters as multiple bytes. 6 hex bytes might be 2 emoji (3 bytes each) or 6 ASCII characters.

Is this useful for binary data?

Only when the binary contains UTF-8 text. Pure binary (images, executables) decodes to garbage; use a hex viewer for non-text data.

Tips​

  • Try multiple encodings if UTF-8 decode looks garbled β€” Latin-1 / Windows-1252 / UTF-16 are the common alternatives.
  • For round-trip checks, encode then decode and confirm the original is recovered exactly.
  • When a single weird byte appears mid-text, the U+FFFD marker shows exactly where β€” invaluable for locating corruption.
  • The codepoint view turns "what byte is that" into "what character is that" instantly.
  • Pair with the UTF-8 to hex tool for full byte-level workflows.

Try it now​

The full hex-to-utf8 runs in your browser at https://ztools.zaions.com/hex-to-utf8 β€” no signup, no upload, no data leaves your device.

Open the tool β†—


Last updated: 2026-05-05 Β· Author: Ahsan Mahmood Β· Edit this page on GitHub