Text to Hex
Convert text to hexadecimal bytes and hex back to text online. Choose spaces, commas or 0x prefixes and upper or lower case. UTF-8 and emoji are supported.
Runs in your browser · Nothing uploaded · No sign-up
Something not working, or missing a feature? Send feedback
About the Text to Hex
The Text to Hex converter writes text as hexadecimal bytes and turns hex back into text. Choose plain, comma-separated or 0x-prefixed output in upper or lower case, ready to paste into code, a hex editor or a network debugging tool. Text is encoded as UTF-8, so emoji and non-English letters work.
Everything runs in your browser, so your input is never uploaded to a server.
How to use the Text to Hex
- Choose "Text to hex" or "Hex to text".
- Paste your text or hex bytes. When decoding, spaces, commas and 0x prefixes are accepted.
- Pick the output format and case, then copy or download the result.
Examples
Input
Hello
Result
48 65 6c 6c 6f
Each byte is two hex digits; H is 0x48.
Input
48 65 6c 6c 6f
Result
Hello
Common mistakes
- Odd number of digits. A byte needs exactly two hex digits. "486" is ambiguous, so add the missing leading zero (0486 or 48 6).
Works well with the Text to Hex
- Text to Binary: see the same bytes in binary.
- Number Base Converter: convert single numbers between hex and decimal.
- Unicode Escape / Unescape: write characters as \uXXXX escapes.
Frequently asked questions
How do I convert a string to hex?
Each character is encoded as UTF-8 bytes and every byte is written as two hex digits. "Hello" becomes 48 65 6c 6c 6f.
Can it decode hex that has 0x prefixes or commas?
Yes. Spaces, commas, colons, hyphens and 0x prefixes are ignored when decoding, so values like 0x48, 0x69 work.
Is this the same as ASCII to hex?
For English letters, digits and common symbols, yes: UTF-8 and ASCII use the same bytes. Other characters produce more than one byte.
Guides and tutorials
Related tools
Case Converter
Convert text between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case and more online. Rename variables and keys in one paste.
Remove Duplicate Lines
Remove duplicate lines from text online, keeping the first occurrence and the original order. Optionally ignore case, extra spaces and empty lines.
Sort Lines
Sort lines of text online alphabetically, naturally (item 2 before item 10), by number or by length, in ascending or descending order. Runs in your browser.
Remove Line Breaks
Remove line breaks from text online: join broken lines from a PDF or email into one paragraph, or into a comma-separated list. Optionally keep paragraph breaks.
Remove Extra Spaces
Remove extra spaces from text online: collapse repeated spaces and tabs, trim every line and squeeze blank lines. Clean pasted text in one click.
Slug Generator
Turn any title into a clean URL slug online: lowercase, accents removed, symbols dropped, words joined with hyphens or underscores. One slug per line.