Skip to content
Sealpaste

Delete all recent work?

This removes the 0 items saved in this browser. Your settings stay.

Stop saving recent work?

New work won't be saved in this browser. The 0 items already saved can stay or go.

Text to Hex

Text

Paste text, or

CtrlV paste · Ctrl↵ run now

Bytes
Ready
Ln 1, Col 1
Runs in your browser. Nothing you paste is uploaded unless you share it.

Convert text to UTF-8 hex bytes, with spaces, commas or nothing between, lower or upper case

Paste text to get its UTF-8 bytes in hex, two digits a byte, the way a hex editor, a debugger or a protocol spec shows them.

How to use it

  1. Paste text, or open a text file.
  2. Pick Hex (ff), Hex (FF), Hex (0xff) or Hex (\xff), and a space, a comma or nothing between bytes.
  3. Copy or download the hex. Bytes → Text reads hex back.

Examples

A word

Input
Hello
Result
48 65 6c 6c 6f

Capitals, nothing between

Input
Hello
Result
48656C6C6F

Write as: Hex (FF), Between bytes: None.

A C or Python string escape

Input
Hi
Result
\x48\x69

Write as: Hex (\xff), Between bytes: None.

A symbol is three bytes

Input
€5
Result
e2 82 ac 35

Hex is a byte in two digits

A byte is 0 to 255, and hex writes it in exactly two digits, 00 to ff, where a to f stand for 10 to 15. That is why hex is the usual way to show bytes: 48 is 4 × 16 + 8 = 72, the letter H.

Why one character can be several bytes

The page writes text as UTF-8, the encoding most web pages, files and APIs use today. Plain English letters, digits and punctuation are one byte each, the same as ASCII, so “A” is 41 in hex. Other characters take two to four bytes.

CharacterBytes in hexBytes
A411: ASCII letters, digits, punctuation
éc3 a92: accented Latin, Greek, Cyrillic, Hebrew, Arabic
€e2 82 ac3: most other scripts (Chinese, Hindi) and symbols
😀f0 9f 98 804: most emoji

Questions

How much text can it convert?
Up to 2 MB of text at once; written as bytes it comes out several times longer.
Is this the same as a Unicode code point?
Only for ASCII. The page shows the UTF-8 bytes: € is the code point U+20AC but the three bytes e2 82 ac. Code points are what \u20ac in JSON and € in HTML write.
How do I write the hex in code?
Pick Hex (0xff) with Comma between bytes for an array in C, Java or JavaScript: 0x48, 0x69. Pick Hex (\xff) with None for a C or Python string: \x48\x69. Hex to Text reads 0x48, \x48 and %48 back as they are.
Is the text I convert uploaded?
No. Everything runs in your browser, so your text stays on your device. Nothing you paste is uploaded unless you share a result, which is locked with your password first.

Related tools