What is text to hex converter?
Every character is stored as one or more bytes. Hexadecimal writes each byte with two digits from 0 to F, which is shorter than binary and common in programming.
This tool shows hex and decimal ASCII codes, and it can reverse hex into readable text.
How to use the text to hex converter
- Choose text to hex or hex to text.
- Type or paste your input.
- Press Convert and copy the result.
How the text to hex converter works
Text is encoded as UTF 8 bytes. Each byte is written in base 16 with two digits. For decoding, pairs of hex digits are read as bytes and decoded as UTF 8.
Worked example
Common uses of the text to hex converter
- Debugging network or file data.
- Learning encoding.
- Writing color or byte values.
- CTF puzzles.
- Checking character codes.
Tips and common mistakes
Use two digits per byte. A is 41, not 4.1.
Accents and emoji use several bytes in UTF 8.
For zeros and ones use the text to binary converter.
Background: what to know before you rely on it
Hex is a compact way to show bytes, which is why memory dumps, color codes and file signatures use it. Two hex digits make exactly one byte, so conversion between hex and bytes is direct.
Private, free and fast
This tool runs in your browser. What you type or choose is not sent to a server and is not saved after you close the page. No sign in is needed. It is free to use as often as you like. See more in all converters, or browse the full list of tools.
Field by field guide
- Direction: Choose one of: Text to hex; Hex to text.
- Input: Type or paste your text here. Use a new line for each entry where the label says so.
- Separator: Choose one of: Space; None; Comma; 0x prefix.
Change one field at a time to see how the result responds, and use the worked example above to check that you get the same answer.
Text as hexadecimal
Each character is shown as its UTF8 bytes in hexadecimal. The letter A is 41 and a space is 20.
Practical scenarios
- Debugging a string that has a hidden character.
- Learning how encodings work.
- Preparing a value for a protocol that needs hex.
Common mistakes
- Expecting one byte per character. Letters outside basic English use two to four bytes.
- Mixing hex and decimal codes.
- Treating hex as encryption. It is only a different way to write the same data.
Hex and text encoding
Computers store text as numbers. Hexadecimal is a compact way to write bytes, with two hex digits per byte, so the word Hi is 48 69.
Expert tips
- Use hex to inspect unusual characters, such as a non breaking space shown as C2 A0 in UTF8.
- Remember that characters beyond basic English use several bytes, so a single emoji can be four bytes.
- Group bytes in pairs when reading, and ignore spaces between them.
- Use hex when debugging network protocols and file headers.
- Convert back to text only with the same encoding that was used.
Hex is a notation, not a security measure. It reveals nothing and hides nothing.
Hex is the same bytes written in base 16
Text to hex does not change the data, it only writes each byte as two base 16 digits. The letter H is 72 in decimal, 01001000 in binary and 48 in hex, all the same byte. That is why developers use hex to inspect text, colors and network data. Non English characters and emoji use several bytes in UTF 8, so they give several hex pairs. Decoding fails when a pair is missing a digit or contains letters beyond F.
Frequently asked questions
What is hex?
A base 16 number system that uses 0 to 9 and A to F.
Is it the same as ASCII?
ASCII codes for basic English letters match UTF 8. Other characters use several bytes.
Why does decoding fail?
The input needs an even number of hex digits and only 0 to 9 and A to F.
Is my text saved?
No.
How do I convert ASCII text to hex?
Look up the code of each character and write it in base 16, or paste the text into the tool. For example, A is 41 and a is 61. The tool does this for the whole text at once.
What is the hex code for a space?
A space is 20 in hex, which is 32 in decimal. It is a real character, so it appears in the output between words.
Why does my hex not decode?
Hex input needs pairs of digits from 0 to 9 and A to F, and the bytes must form valid UTF 8 text. A single digit, an extra letter or cut off data makes decoding fail.
What is the hexadecimal base?
Hexadecimal is base 16. It uses the digits 0 to 9 and the letters A to F for the values 10 to 15, so one byte fits in exactly two hex digits.
How do I convert the alphabet to hexadecimal?
Each letter has a character code. Capital A is 41, B is 42 and Z is 5A in hex, while lowercase a is 61 and z is 7A. Type the letters into the tool to see every code at once.
Related tools
Text to Binary Converter
Type text to get its binary or hexadecimal code, or paste binary or hex to read the text. It uses UTF8,...
ConvertersUnit Converter
Pick a category, choose the unit you have and the unit you want, then enter a value. The converter also...
ConvertersTemperature Converter
To convert Celsius to Fahrenheit, multiply by 9/5 and add 32. To convert Fahrenheit to Celsius, subtract...
ConvertersRoman Numeral Converter
Roman numerals use the letters I, V, X, L, C, D and M for 1, 5, 10, 50, 100, 500 and 1000. Enter a...
ConvertersNumber to Words Converter
Enter a number and the tool writes it in English words, for example 1,250 becomes One thousand two...
ConvertersBinary, Decimal and Hex Converter
Enter a number and its base. The converter shows the same value in binary (base 2), octal (8), decimal...
Results are for information and education. For legal, financial, medical or security decisions, check with a qualified professional. Check critical conversions with an official source.