Skip to content

Hex Text Converter

Convert text to hex and hex to text.

Converted
Converted text to hex.

Hex Text Converter turns text into a space-separated hexadecimal byte string, or decodes a hex string back into readable UTF-8 text, entirely in your browser using the standard TextEncoder and TextDecoder APIs.

How it works

Text to hex encodes the input as UTF-8 bytes and formats each byte as a two-digit hex value. Hex to text strips whitespace and common separators, validates the remaining string is valid hex with an even digit count, and decodes the resulting byte array as UTF-8.

Benefits

  • Correctly handles multi-byte UTF-8 characters, not just ASCII
  • Tolerates spaces, colons, and hyphens between hex byte pairs
  • Validates UTF-8 decoding instead of producing garbled text
  • Runs entirely client-side with the browser's built-in encoding APIs

Use cases

  • Inspect or reconstruct byte-level data shown as hex dumps
  • Convert short strings to hex for low-level or embedded projects
  • Debug encoding issues by comparing byte-for-byte hex output
  • Decode hex-encoded strings from logs, configs, or APIs

Best practices

  • Keep an even number of hex digits so every byte pairs up completely
  • Use consistent separators (spaces) for readability when sharing hex
  • Remember multi-byte characters produce more than one hex byte pair
  • Strip unrelated prefixes like 0x before pasting long hex strings

Common mistakes

  • Pasting an odd number of hex digits, leaving one byte incomplete
  • Assuming every character is exactly one byte (UTF-8 uses more for many scripts)
  • Mixing up hex digits with binary digits by mistake
  • Including non-hex characters like 'g' or 'z' in the input

Privacy

All encoding and decoding happens locally in your browser using standard Web APIs. ToolHub does not receive the text or hex you enter unless you separately opt in to on-device history.

Frequently asked questions

How is text converted to hex?
Text is encoded as UTF-8 bytes, and each byte is written as a two-digit hexadecimal value (for example, the letter A becomes 41), separated by spaces.
What format should hex input use for Hex → Text?
A hex string with an even number of digits, for example "48 65 6c 6c 6f" or "48656c6c6f". Spaces, colons, and hyphens between byte pairs are ignored automatically.
Does this support uppercase and lowercase hex digits?
Yes. Both uppercase (A–F) and lowercase (a–f) hex digits are accepted for decoding, and output uses lowercase by convention.
What happens with an odd number of hex digits?
The tool reports an error, since hex bytes must be represented by exactly two digits each—an odd digit count means at least one byte is incomplete.
Can this handle accented letters or emoji?
Yes. Because encoding uses UTF-8, multi-byte characters produce multiple hex byte pairs and decode back to the original character correctly.
Does this tool upload my text?
No. All encoding and decoding happens locally in your browser using the built-in TextEncoder and TextDecoder APIs.

Version 1.0.0 · Updated 2026-07-27 · 1 minute