ToolSec

Hex ↔ Text Converter

Convert text to hexadecimal and decode hex back to text, with UTF-8 support.

Updated: June 27, 2026

Convert between text and hexadecimal

Hexadecimal is a compact way to represent the raw bytes of a string. This tool turns text into its hex byte sequence and decodes hex back into readable text, with full UTF-8 support so accented characters and emoji survive the round trip. Conversion happens in your browser, so you can safely work with sensitive data.

How text becomes hex

First the text is encoded to bytes using UTF-8 — the standard text encoding of the web. Each byte is then written as two hex digits. The letter H is byte 0x48, so "Hi" becomes 4869. ASCII characters map to a single byte each, but non-ASCII characters take more: é is two bytes, c3a9, and an emoji is four. That's why a short string can produce more hex than you'd expect.

Decoding hex back to text

To decode, the tool reads the hex two digits at a time into bytes, then interprets those bytes as UTF-8 text. It tolerates common formatting — spaces between bytes, a 0x prefix, mixed case — so you can paste hex straight from a debugger, packet capture or log. The input must have an even number of hex digits, since each byte is exactly two.

Common uses

  • Reading a hex dump from a network capture or hex editor as text.
  • Encoding a string as hex for a protocol or config that expects it.
  • Inspecting how a string is represented at the byte level, including its UTF-8 encoding.
  • Spotting hidden or unexpected bytes (like a BOM) in data.

Hex is encoding, not encryption

Like Base64, hex is fully reversible and provides no security — it just makes bytes printable. Don't use it to hide secrets. For other representations, see the Base64 converter and the number base converter; to hash data instead, use the hash generator.

Frequently asked questions

Why is one character sometimes more than two hex digits?

Text is encoded as UTF-8 first. ASCII characters are one byte (two hex digits), but accented letters take two bytes and emoji take four — so non-ASCII characters produce more hex.

Can I paste hex with spaces or a 0x prefix?

Yes. The decoder strips spaces, colons, dashes and a leading 0x, and accepts upper or lower case. The only requirement is an even number of hex digits.

Is my data uploaded?

No. Both directions run in your browser with JavaScript, so the text and hex never leave your device.

Is hex encoding secure?

No. Hex is a reversible encoding with no key, so it offers no confidentiality. To protect data, hash it (for integrity) or encrypt it (for confidentiality).

Low-level debugging tools

When you work with raw bytes regularly, these help:

  • Hex editor View and edit files at the byte level, with synchronized hex and text panes.
  • Packet analyzer Inspect network traffic byte by byte and decode payloads while debugging protocols.

Learn more

Related tools