devtools

Text to Hex Converter

Convert text to hexadecimal and back in your browser, with a choice of delimiter and case and tolerant decoding of spaced, colon or 0x-prefixed hex input.

Runs entirely in your browser — your data never leaves your device.

How to use Text to Hex Converter

What it does & when you need it

This tool prints the raw bytes of your text as hexadecimal and reads hex back into text. It is handy whenever you need to see what is actually inside a string — debugging an encoding bug, comparing bytes against a spec, building a test fixture, or checking how many bytes a multi-byte character really takes. Because it encodes as UTF-8 first, emoji and non-Latin scripts reveal their true byte sequences rather than a single opaque character.

How to use

  1. Choose Encode or Decode.
  2. In Encode mode pick a Delimiter (space, none, colon, or comma) and toggle Uppercase if you prefer AF over af.
  3. Paste text or hex on the left, or press Sample. Copy the result with Copy result or Ctrl/Cmd + Enter.

Things worth knowing

Two hex digits per byte. An ASCII letter is one byte — A is 41 — while a character like é is two bytes (c3 a9) and an emoji is four. The byte count, not the character count, is what the hex reflects, which is exactly why hex is so useful for spotting encoding surprises.

Decoding is forgiving. Spaces, tabs, newlines, commas, colons, and dashes between bytes are ignored, and an optional 0x prefix on each group is stripped. So a MAC address, a hex-editor dump, or a 0x48 0x69 style list all decode without cleanup. An odd number of digits, or any character outside 0-9 and a-f, is flagged with a clear error.

Case and delimiter are cosmetic. They change how the hex looks, not what it means, so 48 69, 4869, and 48:69 all decode to the same text. To carry bytes more compactly, try Base64 or Base58; to fingerprint them instead, see the Hash Generator.

Examples

Text to hex

Hello, 世界! 😀

UTF-8 bytes shown space-separated; the CJK characters and emoji expand to several bytes each.

Hex back to text

48 65 6c 6c 6f 2c 20 f0 9f 98 80

Switch to Decode mode to read these bytes back as "Hello, 😀".

Tolerant decoding

0x48:0x69

The colon and 0x prefixes are ignored, so this still decodes to "Hi".

Frequently asked questions

What does the hex output represent?

Each pair of hex digits is one byte of your text after UTF-8 encoding. A plain ASCII letter is a single byte, such as 41 for "A", while an accented letter or emoji spans several bytes — "é" is c3 a9 and 😀 is f0 9f 98 80. Reading the bytes back through UTF-8 restores the original characters.

Which delimiter and case should I choose?

A space between bytes is the most readable and is what hex viewers show; choose None for a continuous string, or a colon for the byte-pair style seen in fingerprints and MAC addresses. Uppercase or lowercase is purely cosmetic — both decode identically — so match whatever your other tools expect.

What input does the decoder accept?

It is deliberately forgiving. Spaces, tabs, newlines, commas, colons and dashes between bytes are ignored, and an optional 0x or 0X prefix on each group is stripped. So you can paste hex from a hex editor, a MAC address, or a "0x48 0x69" dump without cleaning it up first.

Why do I get an odd-length error?

Every byte needs exactly two hex digits, so a valid string always has an even count of them. An odd count means a digit is missing or an extra one slipped in. Check for a truncated paste or a stray character; the tool reports the digit count to help you spot it.

Is my text uploaded anywhere?

No. The conversion runs entirely in your browser, so text, keys, or byte dumps never leave your machine, and the tool keeps working offline once the page has loaded.