Text to Hex Converter
Turn text into hexadecimal, the compact base-16 notation programmers use to inspect bytes. Each UTF-8 byte becomes two hex digits, with options for capitals, 0x prefixes and separators to match the format your code or tool expects.
How to Convert Text to Hex
Quick answer: type your text; the hex bytes appear below. Pick capitals, 0x prefixes and a separator to match your format.
-
1
Type your text
Or paste it, or open a file.
-
2
Choose the format
Case, prefix and separator.
-
3
Choose the encoding
UTF-8 bytes or code points.
-
4
Copy or download
Use the hex anywhere.
What You Get
What Is Hexadecimal?
Hexadecimal, or hex, is a base-16 number system that uses the digits 0 to 9 and the letters A to F. One hex digit represents four bits, so exactly two hex digits describe one byte, from 00 to FF. That makes hex a compact, readable way to look at the raw bytes of text, files, colours and network data, which is why it is used everywhere in programming.
UTF-8 Bytes or Code Points?
With UTF-8 bytes, the default, you see exactly how the text is stored: "A" is 41, "é" is C3 A9 and "☕" is E2 98 95. This is what you need for byte-level work, debugging and comparing with file dumps. Code points show one hex number per character, its Unicode position, such as E9 for é or 2615 for ☕, which is handy for looking up characters and writing escape codes.
Matching Your Format
Different tools write hex differently. Use a space separator for readability, none for a continuous string used in hashes and keys, comma with the 0x prefix for arrays in C, Java or JavaScript, and new line for one byte per line. Capital or small letters do not change the value; pick whichever your project uses.
Example
"Hello" becomes 48 65 6c 6c 6f. With capitals, the 0x prefix and commas, it becomes 0x48, 0x65, 0x6C, 0x6C, 0x6F, ready to paste into a byte array. Use Hex to Text to turn hex back into words.
Who Uses Text to Hex?
Developers preparing test data and byte arrays, security and network specialists comparing payloads, embedded engineers writing strings into firmware, students learning about character encoding, and anyone who needs to see invisible characters such as tabs, non-breaking spaces or zero-width characters that cause bugs; in hex they stand out clearly.
Good to Know
Every character becomes at least two hex digits, so the result is roughly twice as long as plain English text and longer for other languages. Hex is not encryption; it is just another way to write the same bytes. For an even more compact text-safe form of the same data, use Text to Base64, and for ones and zeros, Text to Binary.
Step by Step
Paste the text you want to inspect or embed. Pick the format your destination expects: a continuous string for keys and hashes, spaces for reading, or commas with 0x prefixes for code. Choose capital or small letters to match your project's style. Copy the hex with one click, or download it as a .txt file to keep alongside your code or test data.
Comparing two strings that look identical? Convert both to hex: hidden characters such as non-breaking spaces show up as different bytes straight away.
The input is never changed.
Private, Free and Instant
The converter is free and handles text up to 5 MB. There is no sign-up, no limit and nothing to install. Everything runs inside your browser, so passwords, tokens, customer data and private messages are never uploaded, logged or stored anywhere. The result updates instantly as you type or paste, and you can open a text file from your device and download the result as a new file. It works on Windows, Mac, Linux, Chromebooks, iPhone and Android.
Writing Text as Hexadecimal Bytes
Every character on your screen is stored as one or more numbers. Writing text as hexadecimal shows those bytes: the letter A is 41, a space is 20 and a line feed is 0A. It is a common step in debugging, protocol analysis and puzzle solving.
How it works
The text is encoded as UTF-8 and each byte is written as two hex digits. Basic English letters need one byte, accented letters two, and most emoji four. So "é" becomes C3 A9, and the word Hi becomes 48 69.
Uses
- Inspect what bytes a program really sends.
- Prepare values for configuration files and test data.
- Learn how encodings work.
To go back, use hex to text.
Frequently Asked Questions
Questions about text to hex