Text to hex converter

Type or paste text to see its bytes in hexadecimal. Text is encoded as UTF-8, so é is c3 a9 and 😀 is f0 9f 98 80, the same bytes Python, Node and PHP produce. Choose spaced, plain, uppercase, a 0x list for C arrays, or \x escapes for string literals.

Encode a file:

Why hex decoders disagree

Hex writes each byte as two digits, but tools differ on what else they accept, and some fail silently. Measured on Node 24, Python 3.14 and PHP 8.5:

This decoder skips spaces, line breaks, commas, colons, dashes and brackets, reads 0x, \x and % prefixes (so C arrays, escaped strings, MAC addresses and percent-encoding all work), and pads a lone digit in a group like 0xA. Anything else is named with its position instead of being dropped.

Text to hex: UTF-8, not character codes

Many snippets convert text with charCodeAt(i).toString(16), which gives UTF-16 code units, not bytes: é becomes e9 (its Latin-1 code) instead of the UTF-8 bytes c3 a9, and 😀 becomes the surrogate pair d83d de00 instead of f0 9f 98 80 (a for…of loop gives only d83d). This page encodes with UTF-8, matching s.encode().hex() in Python, Buffer.from(s).toString('hex') in Node and bin2hex() in PHP. When the decoded bytes are not valid UTF-8, they are treated as a file: its type is detected (PNG, PDF, ZIP and more) and you can download it.

Render HTML to a PDF or an image

Shotmint is a screenshot and PDF API. POST https://shotmint.creasework.com/v1/pdf with {"html": "…"} returns a PDF, and /v1/screenshot returns a PNG of any URL or HTML, rendered in real Chromium (1 credit each; 25 free renders a month, then €5 for 2,000 that never expire). Add response=url to get a link instead of the bytes, or put the URL in a query string with the encoding above. Scripts, AI agents and Make or Zapier can get a key with a bare POST https://shotmint.creasework.com/v1/keys/free (no body, JSON reply); request bodies are described in openapi.json.

Get 25 free renders a month API docs

FAQ

Is my text uploaded? No. Encoding and decoding run in your browser and nothing is sent to a server, so tokens, API keys and private data stay on your device.

Is Base64 encryption? No. Anyone can decode it; it only turns bytes into text that survives email, JSON and URLs, and makes the data about 33% bigger.

Related tools: Base64 encoder, Base64 decoder, JWT decoder, URL encoder, URL decoder, Hex to text converter, HTML encoder, HTML entity decoder, JSON formatter, Image to Base64, Base64 to image.

Related tools

Hex to text / text to hex · Add text to image · PDF to text · Image to text (OCR) · Add text to PDF · Text Compare · Screenshot to Text · JPG to Text · Extract Text from Website · Extract Text from Image · Compare Two Text Files · all free tools