Developer tools
UTF-8 text to hex converter
Encode text as lowercase hexadecimal UTF-8 bytes separated by spaces. Decode complete pairs of hex digits; ASCII spaces, tabs and line breaks between bytes are ignored. Prefixes such as 0x, odd digits and invalid UTF-8 are rejected. The output is text, not an arbitrary binary-file download. A leading UTF-8 BOM is retained as a character.
Paste text, choose options and calculate. Up to 20,000 UTF-16 code units (an emoji can use more than one). Empty input is allowed except for naming conversion.
Result
Method:
Processing stays in this browser tab. Input is not sent, saved in browser storage or added to the URL. The original TXT download contains the result. The additional JSON export contains the input, selected options and exact result. Copy may require permission; selecting text is available as a fallback. Changing an input clears the previous result. Optional own UTF-8 file up to 32 KiB and 20000 UTF-16 units; raw file and form line endings are recorded separately. CSV protects formula-like lines with an apostrophe; printable HTML refuses unsupported control characters. Optional live calculation is off by default.
How it works
Encode text as lowercase hexadecimal UTF-8 bytes separated by spaces. Decode complete pairs of hex digits; ASCII spaces, tabs and line breaks between bytes are ignored. Prefixes such as 0x, odd digits and invalid UTF-8 are rejected. The output is text, not an arbitrary binary-file download. A leading UTF-8 BOM is retained as a character. Shared own file and JSON/numbered-line CSV/printable HTML exports record the unchanged calculation result and actual selected options. Processing stays in this browser tab. Input is not sent, saved in browser storage or added to the URL. The original TXT download contains the result. The additional JSON export contains the input, selected options and exact result. Copy may require permission; selecting text is available as a fallback. Changing an input clears the previous result. Optional own UTF-8 file up to 32 KiB and 20000 UTF-16 units; raw file and form line endings are recorded separately. CSV protects formula-like lines with an apostrophe; printable HTML refuses unsupported control characters. Optional live calculation is off by default.
Worked example
Example input: Hello 🌍
Worked example
With these example values the calculator gives the result below. You can change any value in the form above.
Inputs
- Input text
- Own sample 🚀
- Operation
- Encode
Result
- Result
- Unicode code points: 44
Frequently asked questions
How do I convert text to hex?
Enter your text and choose encode. The tool outputs lowercase hexadecimal UTF-8 bytes separated by spaces. For example, Own sample with a rocket emoji gives 4f 77 6e 20 73 61 6d 70 6c 65 20 f0 9f 9a 80.
How do I decode hex back to text?
Enter complete pairs of hex digits. ASCII spaces, tabs and line breaks between bytes are ignored.
Does the hex converter accept a 0x prefix?
No. Prefixes such as 0x, odd digits and invalid UTF-8 are rejected.
Can I decode a binary file with this tool?
No. The output is text, not an arbitrary binary-file download.
How much text can the hex converter handle?
Up to 20,000 UTF-16 code units, and an optional UTF-8 file of up to 32 KiB. An emoji can use more than one unit.
What happens to a UTF-8 byte order mark?
A leading UTF-8 BOM is retained as a character.