Hex converter

Convert text to hexadecimal (hex) code and hex back to readable text. Handy for debugging, encoding and learning. Free online text to hex converter.

Convert between text and hexadecimal

Hexadecimal (base 16) uses the digits 0–9 and the letters A–F. It's the shorthand programmers use for bytes, because one byte always fits in exactly two hex digits. The letter A (character code 65) is 41 in hex, and "Hi" is 4869. This converter writes the bytes back to back with no spaces.

Choose To hex to turn text into hexadecimal codes, or To text to decode hex back into characters. You'll find hex in color codes, memory dumps, network packets, file signatures, URL encoding and many debugging tools.

Converting by hand means looking up every character. This tool does the whole string at once.

How to use the hex converter

  1. Paste your text or hex values.
  2. Choose To hex or To text.
  3. Submit to convert.
  4. Copy the result.

Examples

Text to hex

Input: Hi

Output: 4869

Accented text

Input: café

Output: 636166c3a9

c, a, f are one byte each; é is the two bytes c3 a9.

Hex to text

Input: 4d79426f747379

Output: MyBotsy

Uppercase hex

Input: 4D79

Output: My

Upper and lowercase digits decode the same.

Common uses

  • Reading hex dumps from logs, packets or debugging tools.
  • Encoding strings for programming or testing.
  • Understanding percent-encoding in URLs (which uses hex).
  • Solving puzzles and CTF (capture the flag) challenges.
  • Learning number systems in computer science.
  • Reading the raw bytes in a log file or network capture.
  • Spotting hidden characters, such as a non-breaking space (c2a0) or a byte order mark (efbbbf), in text that looks normal.
  • Preparing test data for hardware, APIs or databases that store bytes as hex.

Tips and things to know

Edge cases and limitations

  • Hex to text needs one continuous string. Spaced pairs like 4d 79 fail; remove the spaces first.
  • The number of digits must be even. 4d7 fails because the last byte is incomplete.
  • Prefixes such as 0x or \x must be removed before decoding.
  • Hex that decodes to binary data, not text, shows as unreadable symbols.

Frequently asked questions

What is hexadecimal?

A base-16 number system using 0–9 and A–F. One hex digit represents 4 bits, so two digits make one byte.

Why do programmers use hex?

It's much shorter than binary and maps neatly onto bytes, which makes raw data easier to read.

What is "hello" in hex?

68656c6c6f (one pair of digits per letter: 68 65 6c 6c 6f).

Is hex encoding the same as encryption?

No. It's just another way of writing the same data and can be reversed by anyone.

How many hex digits is one character?

Two for each byte. Plain English letters are one byte (2 digits), accented letters like é are two bytes (4 digits) and most emoji are four bytes (8 digits).

Related tools

Similar tools

Binary converter

Convert text to binary code (Hi = 1001000 1101001) and binary back to text. Learn how computers store characters. Free online binary translator.

Ascii converter

Convert text to ASCII character codes and ASCII codes back to text. Look up the number behind every letter and symbol. Free online ASCII converter.

Decimal converter

Convert text into decimal character codes (H = 72) and decimal codes back to text. Useful for programming, encoding and puzzles. Free converter.

Popular free tools