Use the free Hex Text Encoder and Decoder below: your data never leaves your browser — all work happens on your device, and nothing is uploaded to any server.
What Hex Encoding Is
Hexadecimal, or hex, writes every byte of data as two digits, using 0 to 9 and a to f. The text “Hi” is two bytes, and in hex it is 4869: 48 for H, 69 for i. Hex is the standard way programmers look at raw data, because it shows every byte exactly, with no ambiguity about characters, encodings, or invisible control codes. Debuggers, network tools, and file inspectors all display hex for this reason.
Converting text to hex, and hex back to text, is a basic skill for anyone working with data formats, APIs, or encodings. This tool does both directions in your browser, with nothing uploaded, and with options for spacing and uppercase output to match the style you need.
How to Use the Tool
Type text into the input box and press Encode text to hex. The output shows two hex digits per byte. Tick Spaces between bytes for a more readable form like 48 65 6c, which is handy when comparing bytes by eye. Tick Uppercase hex for 48656C style, which some systems prefer. To decode, paste hex into the input and press Decode hex to text. Spaces, line breaks, and a leading 0x are all tolerated, so hex copied from different tools works without manual cleanup.
Try the sample: “Hello, hex!” becomes 48656c6c6f2c2068657821. Decode it back and you get the original text. Try an accented letter too: é becomes c3a9, two bytes, because this tool encodes text as UTF-8, the web’s standard encoding. That is why multi-byte characters produce more than two hex digits.
Why Text Becomes More Than One Byte Per Character
Beginners often expect one hex pair per character, and are surprised when é takes two pairs or a checkmark takes three. The reason is UTF-8. Plain English letters fit in one byte each, but the world’s writing systems need more. UTF-8 gives common characters one byte, European accented letters two, and most other scripts and symbols three or four. Hex shows bytes, not characters, so it faithfully reveals this structure.
That honesty is exactly why hex is useful for debugging. If an API rejects your text, or a file shows the wrong characters, converting to hex shows whether the bytes are what you expected. A common culprit is a smart quote or a non-breaking space that looks identical to an ordinary one on screen but has completely different bytes. Hex makes the invisible visible.
Hex Versus Other Encodings
Hex doubles the size of data: every byte becomes two characters. Base64, by comparison, grows data by only a third, which is why it is used for embedding data in text. Hex wins on readability and simplicity: every pair maps to exactly one byte, there is no padding, and a human can convert small values by hand. Base58, which this site also offers, wins when humans must copy codes, because it drops confusing characters. Each encoding trades size, readability, and human-friendliness differently, and hex is the right choice when exactness matters most.
Hex is also not encryption. Like Base58, it is trivially reversible, and anyone can decode it. Never treat hex-encoded text as hidden or protected. It is a display format, not a security measure.
Frequently Asked Questions
Why must hex have an even number of digits? Because each byte is exactly two digits. An odd count means a digit is missing, and the tool reports it rather than guessing.
Does it handle uppercase hex? Yes. Decoding accepts both cases, and encoding can produce uppercase if you tick the option.
Is my text uploaded? No. Encoding and decoding run in your browser with the built-in TextEncoder and TextDecoder. Your text never leaves your device.
Encode text to hex, or decode hex back to text, above.

Pingback: Base58 Encoder and Decoder - Encode Text in Base58 Free Online