Convert Text to Hex and Hex to ASCII
Convert ordinary text into hexadecimal UTF-8 bytes, or decode a hexadecimal string back into readable text. Choose the direction, paste your value, and copy or download the result without writing code.
The converter handles standard ASCII characters as well as accents, non-Latin scripts, and emojis. All processing happens locally in your browser, and invalid hex or malformed UTF-8 produces a clear error instead of a guessed result.
Convert text to hexadecimal
Decode hex back to readable text
Add a space between each hex byte
Use A-F instead of a-f
What Does a Text-to-Hex Converter Do?
A text-to-hex converter represents the bytes of a text string with hexadecimal digits. Each byte becomes two digits from 00 to ff. Converting in the other direction rebuilds those bytes and decodes them as text.
This is useful when inspecting byte values, preparing a string for documentation or source code, checking a protocol sample, or reading hex copied from a log or debugger. It does not convert color values, decimal numbers, or arbitrary binary files.
How to Convert Text to Hex
Select Text to Hex and enter a word, sentence, or multiline string. The tool encodes it as UTF-8 and prints each byte as a two-digit hexadecimal value.
- Hello → 48 65 6c 6c 6f
- ABC → 41 42 43
- Hi! → 48 69 21
Use the output options to switch between uppercase and lowercase, remove spaces, or add a 0x or \x prefix to every byte. These options change the display format, not the underlying byte values.
How to Convert Hex Back to Text
Select Hex to Text and paste an even number of hexadecimal digits. The converter removes supported prefixes and whitespace, turns each pair of digits into a byte, and decodes the resulting byte sequence as UTF-8.
For example, 48 65 6c 6c 6f becomes Hello. Input containing non-hex characters, an incomplete final byte, or an invalid UTF-8 sequence is rejected so that a damaged value is not presented as valid text.
Hex to ASCII and ASCII to Hex
ASCII covers basic English letters, digits, punctuation, and control values. UTF-8 uses the same single-byte values for every ASCII character, so ordinary English text converts identically in both encodings.
That means A converts to 41, and 48 69 converts to Hi. The tool can therefore be used as a hex-to-ASCII translator for values below 80 hexadecimal while still supporting the broader UTF-8 character set when a string contains other languages or symbols.
UTF-8 Hex for Accents, Symbols, and Emojis
Characters outside basic ASCII use more than one UTF-8 byte. For example, café becomes 63 61 66 c3 a9, while 😀 becomes f0 9f 98 80.
When decoding, the complete byte sequence must form valid UTF-8. A single byte copied from the middle of a multibyte character cannot be decoded on its own; paste the full sequence to recover the original character.
Accepted Hexadecimal Input Formats
The decoder accepts the common layouts below, using uppercase or lowercase digits:
- Continuous: 48656c6c6f
- Space-separated: 48 65 6c 6c 6f
- 0x-prefixed: 0x48 0x65 0x6c 0x6c 0x6f
- \x-prefixed: \x48\x65\x6c\x6c\x6f
Whitespace and line breaks are allowed. Separators such as commas, colons, or hyphens are not removed automatically and must be deleted before decoding.
Private Browser-Based Conversion
Text and hex values are converted on your device with the browser's built-in UTF-8 support. The page does not need to upload the input or call a conversion API.
Local processing is useful for quick checks of internal snippets, but it does not make an unsafe value trustworthy. Review decoded data before using it in code, commands, or security-sensitive systems.
Text Hex Is Not a Color Converter
A web color such as #1e90ff also uses hexadecimal notation, but its bytes describe red, green, and blue channels rather than encoded text. This page converts text and UTF-8 byte strings only.
If you need to select, inspect, or convert a color, use a dedicated color tool instead of decoding the value as text.
Frequently Asked Questions
❓ How do I convert text to hexadecimal?
Select Text to Hex, enter your text, and copy the generated byte values. You can choose spaces, letter case, and either no prefix, 0x, or \x for the output format.
❓ How do I decode a hex string into text?
Select Hex to Text and paste continuous, space-separated, 0x-prefixed, or \x-prefixed hexadecimal bytes. The converter validates the input and decodes the bytes as UTF-8.
❓ What is Hello in hexadecimal?
In ASCII and UTF-8, Hello is 48 65 6c 6c 6f. Removing the spaces gives the equivalent continuous representation 48656c6c6f.
❓ Is hex to ASCII the same as hex to UTF-8?
They are identical for basic ASCII characters because ASCII byte values keep the same meaning in UTF-8. UTF-8 additionally supports multibyte sequences for accents, other writing systems, symbols, and emojis.
❓ Why does my hexadecimal input produce an error?
The input may contain a character outside 0-9 and A-F, an odd number of digits, an unsupported separator, or bytes that do not form valid UTF-8. Correct the source value rather than adding a guessed byte.
❓ Can this converter process a hexadecimal color?
No. It treats hexadecimal pairs as text bytes, not RGB color channels. A dedicated color converter is the correct tool for values such as #1e90ff.
❓ Are my text and hex values uploaded?
No. The conversion runs locally in your browser. Your input is not required by a server or remote conversion API.
Explore More Text Tools
Free online tools to convert, encode, and transform your text
Convert Case
Transform text case — uppercase, lowercase, title case & more
Morse Code Translator
Convert text to Morse code and vice versa
Morse Code Audio Decoder
Decode Morse code from audio files or microphone
Binary Translator
Convert text to binary and vice versa
Base64 Encoder/Decoder
Encode and decode Base64 text
ROT13 Encoder/Decoder
Encode and decode text using ROT13 cipher
Superscript Generator
Convert text to Unicode superscript where supported
Subscript Generator
Convert text to Unicode subscript where supported
Small Text Generator
Generate small caps, tiny superscript, and subscript text to copy and paste
Strikethrough Text Generator
Generate copy-paste Unicode strikethrough text instantly
Image to Base64 Converter
Convert images to Base64 / Data URI
URL Encoder / Decoder
Encode and decode URL components, query strings, and percent-encoded text
HTML Entity Encoder / Decoder
Encode and decode HTML entities such as &, <, >, ", and '
Pig Latin Translator
Translate English to Pig Latin and back