Skip to content
Devtoolry

Text to Hex

Convert text to hexadecimal bytes and hex back to text online. Choose spaces, commas or 0x prefixes and upper or lower case. UTF-8 and emoji are supported.

Runs in your browser · Nothing uploaded · No sign-up

Something not working, or missing a feature? Send feedback

About the Text to Hex

The Text to Hex converter writes text as hexadecimal bytes and turns hex back into text. Choose plain, comma-separated or 0x-prefixed output in upper or lower case, ready to paste into code, a hex editor or a network debugging tool. Text is encoded as UTF-8, so emoji and non-English letters work.

Everything runs in your browser, so your input is never uploaded to a server.

How to use the Text to Hex

  1. Choose "Text to hex" or "Hex to text".
  2. Paste your text or hex bytes. When decoding, spaces, commas and 0x prefixes are accepted.
  3. Pick the output format and case, then copy or download the result.

Examples

Text to hex

Input

Hello

Result

48 65 6c 6c 6f

Each byte is two hex digits; H is 0x48.

Hex to text

Input

48 65 6c 6c 6f

Result

Hello

Common mistakes

  • Odd number of digits. A byte needs exactly two hex digits. "486" is ambiguous, so add the missing leading zero (0486 or 48 6).

Works well with the Text to Hex

Frequently asked questions

How do I convert a string to hex?

Each character is encoded as UTF-8 bytes and every byte is written as two hex digits. "Hello" becomes 48 65 6c 6c 6f.

Can it decode hex that has 0x prefixes or commas?

Yes. Spaces, commas, colons, hyphens and 0x prefixes are ignored when decoding, so values like 0x48, 0x69 work.

Is this the same as ASCII to hex?

For English letters, digits and common symbols, yes: UTF-8 and ASCII use the same bytes. Other characters produce more than one byte.

Guides and tutorials