Hex Encoder (Text to Hex)
Convert text to its hexadecimal byte representation. Each byte is shown as a two-digit hex value, space-separated.
How to Use
- 1
Enter your text
Type or paste the text you want to convert to hexadecimal.
- 2
Click Encode to Hex
Each byte of the UTF-8 encoded text is shown as a two-digit hex value.
- 3
Copy the result
Click Copy to copy the hex output.
What is Hex Encoder?
A hex encoder converts text into its hexadecimal byte representation. Each character is encoded as UTF-8 bytes, and each byte is shown as a two-digit hex value (00–FF). The output is a sequence of hex pairs, separated by spaces — a format that is human-readable, easy to copy, and works with most byte-level tools and protocols.
Hex encoding is the standard way to display binary data in a human-readable form. Hash functions (MD5, SHA-256), cryptographic keys, color codes, MAC addresses, packet captures, and binary file inspectors all use hex. When you need to send binary data through a text-only channel, embed it in source code, or compare two binary blobs visually, hex is usually the right format.
This online hex encoder takes any text — ASCII, Unicode, emoji — and produces UTF-8 bytes shown as space-separated two-digit hex values. ASCII characters (a–z, 0–9) produce one byte each; characters outside ASCII (é, ñ, 你, 🚀) produce two to four bytes each, encoded in UTF-8. The result is reversible: paste it into our [Hex Decoder](/tools/hex-decode/) and you get back the original string. Everything runs in your browser, so sensitive text or proprietary data never leaves your machine.
For Base64 encoding (more space-efficient for transmission), see [Base64 Encoder](/tools/base64-encode/). For URL-safe encoding of special characters, use [URL Encoder](/tools/url-encode/). To learn more about byte-level encodings, read [Base64 Encoding Explained](/blog/base64-encoding-explained/).
FAQ
What encoding is used?
What is the output format?
What characters are used in hexadecimal encoding?
Why is my hex output longer than the input?
How do I get hex without space separators?
Related Articles
Related Tools
Hex Decoder (Hex to Text)
Convert hexadecimal byte values back to readable text. Accepts space-separated, comma-separated, or continuous hex strings.
Base64 Encoder
Encode any text to Base64 online. Supports UTF-8 characters including accents, CJK text, and emoji. Free, fast, client-side.
URL Encoder
Encode special characters for safe use in URLs. Convert spaces, ampersands, and other characters to percent-encoded format.
Unicode Escape
Convert non-ASCII characters to Unicode escape sequences (\uXXXX). Keep ASCII text readable while escaping everything else.
HTML Entity Encoder
Encode special characters to HTML entities. Prevents XSS attacks and ensures HTML code displays correctly on web pages.
ROT13 Encoder
Encode text using the ROT13 cipher. Shifts each letter by 13 positions in the alphabet. Numbers and symbols are unchanged.