Skip to main content

Text to Hex Converter — UTF-8 Bytes Both Ways

Text ⇄ hexadecimal by UTF-8 bytes — Chinese and emoji safe, picks your separator and case, decodes messy pasted hex — runs in your browser

  • Runs locally
  • Category Encoding & Crypto
  • Best for Checking small payloads, tokens, hashes, and encoded values quickly.
Separator
Case
Input
Output
Output appears here.

What this tool does

A free text to hex converter that turns any text into hexadecimal and back, working on the real UTF-8 bytes rather than the character codes a naive tool would use. That difference matters the moment you leave plain ASCII: the letter "A" is one byte, 41, but the Chinese character 中 is three bytes, e4 b8 ad, and a single emoji like 😀 is four bytes, f0 9f 98 80. This tool encodes each character through the same UTF-8 rules a file, a socket or a hex editor uses, so what you copy here is what the machine actually stores. Choose how the bytes are rendered — bare run, space groups, comma lists for C arrays, \x for shell strings, 0x for source code, or one byte per line — and switch between lower and upper case. Decoding is forgiving: paste hex with any mix of spaces, commas, 0x and \x prefixes and newlines, and it strips them, validates the nibbles, and rebuilds the text. Everything runs in your browser; nothing is uploaded. A shareable link reproduces your exact input and options.

Tool details

Input
Text + Numbers
The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
Output
Live result + Copy
The result area focuses on usable output, with copy, download, or preview actions when supported.
Privacy
Browser-side processing
The main tool logic does not call an external API, so inputs normally stay in the current tab.
Save / share
Shareable URL state
Key settings are encoded in the URL so another person can reopen the same setup.
Performance budget
Initial JS <= 9 KB
No WASM budget is declared, keeping the tool quick to open on mobile.
Best fit
Encoding & Crypto · Developer
Category and role tags drive related tools, internal links, and quick fit checks.

How to use

  1. 1. Input

    Paste or drop your content into the tool panel.

  2. 2. Process

    Click the button. All processing is local in your browser.

  3. 3. Copy / Download

    Copy the result or download to disk in one click.

How Text to Hex Converter fits into your work

Use it for quick browser-side encoding, decoding, hashing, token checks, and share-safe transformations.

Encoding jobs

  • Checking small payloads, tokens, hashes, and encoded values quickly.
  • Preparing values for APIs, URLs, docs, or support tickets.
  • Avoiding account-based tools when the input might be sensitive.

Encoding checks

  • Do not paste live secrets unless you are comfortable with local browser handling.
  • Confirm whether the operation is reversible before sharing the result.
  • For hashes, compare the exact algorithm and casing expected by the receiver.

Good next steps

These links move the current task into a more complete workflow.

  1. 1 Morse Code Translator Text to Morse code and back — encode, decode, audio playback, ITU standard. Open
  2. 2 ROT13 Encoder & Decoder ROT13 / ROT47 / Caesar cipher — encode and decode in your browser, instant. Open
  3. 3 Base64 Encoder & Decoder Encode or decode Base64 — text, files, and Data URLs. Runs entirely in your browser. Open

Real-world use cases

  • Read and edit a hex dump while debugging a protocol

    You are staring at a packet capture and need to know what the bytes 48 65 6c 6c 6f actually say. Paste them in decode mode and read "Hello" back. Going the other way, type the reply you want, pick the space separator, and hand the bytes straight to your fuzzer or test harness — no mental ASCII-table lookups, and CJK payloads come out as correct multi-byte UTF-8 instead of mangled single bytes.

  • Write a byte-literal string for source code

    You need "Hi" as an escaped literal for a C or Python string. Encode with the \x separator and get \\x48\\x69 ready to paste between quotes, or switch to 0x for an initializer list like 0x48, 0x69. The case toggle matches your project's style, lowercase for most code, uppercase if your linter wants 0xFF. Decode pasted literals back the same way to check what an obfuscated string contains.

  • Verify how Chinese or emoji text is actually stored

    A form is double-encoding your Chinese names and you want proof of the real bytes. Paste 中文 and see e4 b8 ad e6 96 87 — the exact UTF-8 a correct database column holds. Compare that against what your API returns and the off-by-a-byte bug becomes obvious. The same works for emoji: 😀 is f0 9f 98 80, one code point spread over four bytes, which is why naive substring code splits it in half.

  • Teach or learn how character encoding works

    Encoding clicks once you can watch it. Type one letter and see one byte; add an accent like é and watch it grow to two bytes (c3 a9); add a Chinese character and it jumps to three. Toggle separators and case to see that the bytes are the same, only the notation changes. Share the URL with a student and the exact example reopens for them.

Common pitfalls

  • Encoding by character code instead of UTF-8 bytes. A tool that uses charCodeAt gives 4e2d for 中 — that is the Unicode code point, not a byte sequence. The real UTF-8 is e4 b8 ad. If your hex looks two bytes long for a Chinese character, it is wrong; CJK is three bytes each.

  • Pasting an odd number of hex digits. Every byte is exactly two hex characters, so 414 cannot decode — one digit is missing, probably a dropped leading zero (09 typed as 9). The tool flags the odd count instead of guessing, so fix the source rather than trusting a partial result.

  • Assuming all hex is UTF-8. Bytes captured from a Latin-1 or UTF-16 source will fail to decode here or come out wrong, because the byte boundaries differ. A lone ff or 80 is never valid UTF-8 on its own. Decode in the encoding the bytes were actually written in.

Privacy

Encoding and decoding happen entirely in your browser tab with TextEncoder and TextDecoder — no text, byte or result is ever uploaded, and nothing is logged. The one caveat: the shareable link encodes your input and options into the URL query string, so a link pasted into chat will record that text in the recipient server's access log. For anything sensitive, use the copy button and paste the result rather than sharing the URL.

FAQ

Tool combos

Folks in your role tend to reach for these alongside this tool.

Made by Toolora · 100% client-side · Updated 2026-06-13