How to Convert Hex to Text (and Back)
Hexadecimal, usually called hex, is a way to write numbers using sixteen symbols: the digits 0 through 9 and the letters A through F. It appears in color codes, in file data, in debugging output, and in many places where computers show text as numbers. When hex is used to represent text, each character is written as a pair of hex digits. If you understand pairs, you can convert hex to text and text back to hex with a chart and a careful method.
This guide explains what hex means, how to convert it step by step in both directions, and how to check your work. It includes a complete worked example that converts 48 65 6C 6C 6F to Hello, and it explains the limits that matter, including why hex is not encryption. You do not need programming experience. You need to work in pairs, keep your spacing clear, and check each pair against a table.
What Hex Is
Hex is a base-16 number system. Ordinary decimal numbers use ten symbols, 0 to 9. Hex uses sixteen symbols, 0 to 9 and A to F, where A means 10, B means 11, C means 12, D means 13, E means 14, and F means 15. A single hex digit can represent sixteen values. Two hex digits together can represent 256 values, which is enough for the basic set of characters used in much English text.
That is why text conversion uses pairs. In the system commonly used for basic English text, called ASCII, each character has a number from 0 to 127. That number is written as two hex digits. For example, the capital letter H has the decimal number 72, which is 48 in hex. The lowercase letter e has the decimal number 101, which is 65 in hex. You do not need to do the decimal step every time if you use a chart. You only need to know that each pair of hex digits stands for one character.
Hex is not a language and it does not change meaning. It is a representation. The hex string 48 65 6C 6C 6F and the word Hello carry the same characters, just in different forms. Converting between them is like changing a measurement from inches to centimeters. The underlying value stays the same. The form changes.
How to Convert Hex to Text Step by Step
Follow these steps to convert hex to text by hand. They work best for short strings. Longer strings are possible, but they are easier to check with a tool, and a single dropped digit can change the result.
First, write out the hex string exactly as you received it. Keep any spaces. Spaces are not part of the hex data, but they help you see the pairs. If the string has no spaces, add your own grouping marks as you work, so you can keep track of pairs.
Second, split the hex string into pairs of two hex digits. Start from the left and take two digits at a time. Each pair is one character. If the total number of hex digits is odd, stop and check the input. A valid hex-to-text string should have an even number of hex digits, because each character needs two digits. An odd count usually means a digit is missing or an extra digit was added.
Third, look up each pair in an ASCII table or a hex-to-text chart. Write down the character that matches that pair. Keep the characters in the same order as the pairs. Do not reorder them, and do not skip a pair because it looks like a space or punctuation mark. Spaces and punctuation have their own codes, and they matter.
Fourth, put the characters together and read the result as ordinary text. If the result looks like readable English, that is a good sign, but it is not proof. Check the result by converting it back to hex using the steps in the next section. If the back-conversion matches the original hex exactly, your conversion is likely correct.
How to Convert Text to Hex Step by Step
Converting text to hex uses the same idea in reverse. Write the text exactly as it appears, including spaces, capital letters, and punctuation. Then go through it one character at a time, from left to right. For each character, find its two-digit hex code in an ASCII table and write that code down. Put a space between pairs so the result is easy to read and check. Keep going until you have covered every character, including spaces.
A space has its own code, which is 20 in hex. That surprises many beginners, because a space looks like nothing. In a conversion, a space is still a character, and it still needs a pair. If you skip spaces, words will run together when the hex is converted back. The same rule applies to punctuation. A comma, a period, and an exclamation mark each have their own codes.
Capital and lowercase letters have different codes. H and h are not the same character in ASCII, and they do not have the same hex code. H is 48 and h is 68. That difference is easy to miss when you are working quickly, so check capitalization as you go, especially at the start of a sentence or a name.
Worked Example: 48 65 6C 6C 6F Becomes Hello
Here is a complete worked example using the hex string from the task: 48 65 6C 6C 6F. Start by splitting it into pairs. There are ten hex digits, so there are five pairs: 48, 65, 6C, 6C, and 6F. Each pair will become one character, so the result should be five characters long.
Look up each pair. 48 is capital H. 65 is lowercase e. 6C is lowercase l. 6C is lowercase l again. 6F is lowercase o. Put the characters together in order and you get Hello. The length matches: five pairs give five characters. The capitalization matches: the first character is capital, and the rest are lowercase.
Now check it in the other direction. Start with Hello and convert each character to hex. H is 48. e is 65. l is 6C. l is 6C again. o is 6F. The result is 48 65 6C 6C 6F, which matches the original hex exactly. That round-trip check confirms the conversion.
Try a second short example to practice pairs. The word Hi has two characters. H is 48 and i is 69, so Hi in hex is 48 69. If you convert 48 69 back, you get H and then i, which gives Hi again. Notice that i is 69, not 6C. Small differences like that are why a chart matters more than memory.
Try one more example with a space. The phrase Hi there has a space between the words. Converting it gives 48 69 20 74 68 65 72 65. The pair 20 is the space. If you leave 20 out, the back-conversion gives Hithere, which is not the same phrase. That example shows why you should count pairs and characters. Hi there has eight characters, including the space, so it should have eight pairs.
Reading Hex Without Guessing
The most common mistake in hex conversion is guessing a pair. Hex pairs can look similar. 6C and 6F differ by one letter, but they give l and o, which are different letters. 48 and 68 differ by one digit, but they give H and h. If you guess, you can turn a correct string into a word that looks almost right but is wrong in one place. A chart removes that risk.
Another common mistake is mixing up hex and decimal. In hex, the letter A is not a word or a grade. It is the value 10. In a pair, A and F are digits, not letters of the English message. When you see 41, it means the character A, not the number 41. When you see 4A, it means the character J. Keeping the two systems separate in your mind makes the conversion easier.
It also helps to write pairs in a consistent style. Some charts use capital letters for hex, such as 6C, and some use lowercase, such as 6c. Both mean the same value, but mixing them in one string can make checking harder. Pick one style for your work and keep it consistent.
Where Hex-to-Text Conversion Is Useful
Hex-to-text conversion is useful when you need to read data that a computer shows in hex, or when you need to check how text is stored. It appears in debugging, in file inspection, in learning how character encodings work, and in exercises that teach the relationship between text and numbers. In those contexts, the goal is understanding, not secrecy.
It is also useful for checking short strings that you receive in hex, such as a label, a code, or a sample from a lesson. Converting a short string by hand can help you understand the structure, and converting it back can confirm that you read it correctly. For longer data, a tool is more practical, but the hand method teaches you what the tool is doing.
Hex also appears in color codes, but color codes work differently. A color code such as a six-digit hex value represents red, green, and blue components, not text characters. Do not try to convert a color code to text with an ASCII table. The pairs would give characters, but those characters would not be the meaning of the color. Use the right interpretation for the context.
Limitations
Hex conversion has clear limitations. First, it covers only the characters in the table you are using. Basic ASCII covers English letters, digits, common punctuation, and control characters. It does not cover every accented letter, symbol, or character in every language. Characters outside that set use other encodings, such as UTF-8, where one character can take more than one byte. If you try to force those characters into a simple ASCII hex table, you will get the wrong result.
Second, hex is not encryption. Anyone with an ASCII table can convert hex back to text. Do not use hex as encryption, do not use it to hide passwords, and do not use it to protect private information. If information needs to be protected, use a method designed for security and follow the guidance for the service you are using. Hex is a representation, not a lock.
Third, hex does not include information about the original formatting, such as font, color, or layout. It only carries the characters. A document converted to hex and back will keep its text, but it will not keep its design. Fourth, hand conversion is slow and error-prone for long strings. A single missing digit breaks the pairing for the rest of the string, and the error can be hard to find. For long data, use a trusted tool and check the beginning and end of the result.
Finally, check byte pairs. If the hex string has an odd number of digits, or if a pair contains a character that is not 0 to 9 or A to F, the input is not valid hex for this conversion. Do not guess the missing digit. Ask for the correct input, or check the source again.
Frequently Asked Questions
How many hex digits make one character?
In basic ASCII hex-to-text conversion, two hex digits make one character. Each pair represents one byte, and each byte represents one character in the ASCII table. If you have ten hex digits, you should get five characters. If you have an odd number of digits, check the input before you start.
Is hex the same as encryption?
No. Hex is an encoding, not encryption. Encoding changes the form of data so it can be stored or shown in a different way. Encryption changes data so that only someone with the right key can read it. Hex can be decoded by anyone with a standard table, so it does not protect private information.
Why does 48 mean H?
Because in the ASCII table, the character H is assigned the number 72 in decimal, which is 48 in hex. The table is a shared agreement. As long as both the writer and the reader use the same table, 48 will always mean H in that system. Other tables or encodings can assign different numbers, so check which table your source uses.
What should I do if the hex string has an odd number of digits?
Stop and check the input. A valid hex-to-text string should have an even number of digits. An odd count usually means a digit is missing or an extra digit was copied. Do not guess the missing digit, because the pairing after that point will shift. Get the correct string, or check the source again.
Hex to text is a simple idea once you see the pair rule. Two hex digits make one character, a chart gives you the match, and a round-trip check confirms it. Start with 48 65 6C 6C 6F, decode it to Hello, and convert it back. Once you can do that reliably, you can handle other short strings, and you will know when hex is a useful representation and when it is not a substitute for security.
Try a Tool
Free, in your browser — no sign-up.
Related Articles
How to Format XML So It Is Easy to Read
Learn how to format XML so it is easy to read: consistent indentation, one element per line, matched tags, unchanged data, and…
Read article →How to Build a Query String Without Breaking Your Link
Build a query string without breaking your link. Learn ?key=value, the & separator, encoding, a worked example, and why secrets stay out…
Read article →How to Convert Base64 Back to an Image
Learn how to convert Base64 back to an image, read a data URI, decode a 1 by 1 PNG example, check the…
Read article →