Skip to main content
FixLines

Text to hex converter

Convert text to hexadecimal bytes, or hex back to text.

Editor

Ln 1, Col 10 lines0 words0 characters

Text to hex converter: what it does

Write a text as hexadecimal bytes, two digits per byte, or decode a hex dump back into text. Spaces, commas and prefixes such as 0x are accepted when decoding, so values copied from a debugger or a network capture work as they are.

Text to hex converter: how to use it

  1. Paste your text, or the hex bytes.
  2. Choose Text to hex or Hex to text.
  3. Select Apply and copy the result.

Text to hex converter: when to use it

  • Inspect the bytes of a string that looks wrong because of an encoding problem.
  • Decode a hex dump from a log, a packet capture or a debugger.
  • Prepare a byte sequence for a script, a test fixture or a hardware tool.

Text to hex converter: examples

Convert a word to hex

Input

Hi!

Result

48 69 21
Decode the hex

Input

48 69 21

Result

Hi!
Decode a hex dump with separators

Input

48:65:6c:6c:6f 0x21

Result

Hello!

Text to hex converter: questions and answers

Which separators does decoding accept?

Spaces, commas, colons, hyphens and prefixes such as 0x or \x. The remaining digits must come in pairs.

Is the hex upper or lower case?

Encoding writes lower case; decoding accepts both.

Can I get the hex in upper case or without spaces?

Run Case converter on the result for upper case, or Remove extra spaces with “remove all spaces” for a continuous string.

Why does decoding give strange characters?

The bytes are not valid UTF-8 text, for example because they come from a binary file or another encoding.

Is my text sent to a server?

No. Everything runs in your browser on your own device, so your text never leaves it.

Tools people often use together with this one.

More in Encode & decodeBrowse all text tools