TontonTools

Text to HEX

Convert text to hexadecimal — every character becomes its hex byte code.

100% Free No signup Privacy-friendly Binary & Number Tools
Updated Sep 2026

Share X / Twitter Facebook LinkedIn WhatsApp

How to use Text to HEX

  1. Type or paste your text into the input box.
  2. Read the hex codes instantly — one space-separated code per character: "Hi" → 48 69.
  3. Note multi-digit codes for non-ASCII characters: € shows as 20AC (its Unicode code point in hex).
  4. Click “Copy result” to use the codes in escapes (\x48), URLs or documentation.

What is Text to HEX?

A text to hex converter rewrites each character of a string as its character code in base 16: H is code 72 = hex 48, i is 105 = 69, so "Hi" becomes 48 69. Hex is the standard way to show text's raw bytes because each ASCII character fits exactly two hex digits.

You meet text-as-hex everywhere below the surface: URL percent-encoding (space = %20 — that 20 is hex 32), hex editors and network packet dumps, protocol specs, magic bytes in file headers, and escape sequences like \x41 in code.

About the Text to HEX

Type or paste text and each character's hex code appears instantly, space-separated and ready to copy.

Practical jobs: predicting what percent-encoding will do to a character (é → E9, hence %C3%A9 in UTF-8 URLs), crafting or verifying test payloads for protocol work, writing \x escape sequences, comparing what a hex dump should say against what it does say when hunting an encoding bug, and building classroom exercises about character encoding. Full Unicode is supported — characters beyond ASCII simply produce codes longer than two digits (€ → 20AC).

Conversion is live and local to your browser. Hex to Text decodes the other way; Text to Binary and Text to ASCII show the same string in other notations.

Frequently Asked Questions

48 65 6C 6C 6F. Note the double 6C — repeated letters produce repeated codes, an easy way to sanity-check a conversion by eye.
Percent-encoding is text-to-hex with a % prefix: space is code 32 = hex 20 → %20. Non-ASCII characters are UTF-8 encoded first, which is why é becomes two codes: %C3%A9.
Each byte is exactly two hex digits (00–FF). ASCII text is one byte per character, so a dump's hex column pairs up neatly with its ASCII column on the right.
The identifying first bytes of a file format, always quoted in hex: PNG starts 89 50 4E 47 (the 50 4E 47 is literally "PNG"), PDFs start 25 50 44 46 ("%PDF"). Converting text to hex lets you recognize them.
Hex is case-insensitive — 6c and 6C are the same byte. Conventions differ by tool (CSS lowercase, many dumps uppercase); the values are identical either way.

We use cookies for analytics and to keep the tools free via ads. See our Privacy Policy.