Hex Encoder / Decoder
Encode UTF-8 text to hexadecimal byte pairs or decode hex back to text.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Encoded 5 character(s) of UTF-8 text to 5 hexadecimal byte(s).
How it works
- Read the input as UTF-8 bytes.
- Rendered each byte as two lower-case hexadecimal digits.
- Concatenated the pairs into a single string.
- Hexadecimal is an encoding, not encryption; it provides no confidentiality.
- Uppercase and lowercase hex decode identically; the encoder emits lowercase.
Methodology
- Encode by rendering every UTF-8 byte as two lower-case hexadecimal digits.
- Decode by stripping whitespace, requiring an even digit count, and parsing each byte before decoding the bytes as UTF-8.
- Reject malformed input instead of producing a partial byte.
Usage
- Choose encode or decode.
- Paste text to encode, or a hexadecimal string to decode.
- Read the result; use Copy result to reuse it.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
Encode ASCII
{
"mode": "encode",
"value": "Hello"
}Encode Unicode
{
"mode": "encode",
"value": "café 🌍"
}Decode hex
{
"mode": "decode",
"value": "48656c6c6f"
}Limitations
Where hex is used
Hexadecimal is the conventional way to show byte values in hash digests, colour codes and binary protocols. Two digits per byte map cleanly to eight-bit values, which is why it is preferred over decimal for raw bytes.
Frequently asked questions
- Why are non-ASCII characters several hex pairs long?
- Hex shows UTF-8 bytes, and a character such as é takes two bytes, so it becomes four hexadecimal digits.
- Does the decoder accept spaces or colons?
- Whitespace is ignored, so spaces and line breaks are fine. Other separators such as colons are rejected because they are not hexadecimal digits.
Sources
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.