DuckyTools
Home Developer Text to Hex Converter

Text to Hex Converter Developer

Show text as its hexadecimal bytes, in whichever layout you need.

Text to Hex Converter is a free online tool that show text as its hexadecimal bytes, in whichever layout you need. It runs entirely in your web browser using plain JavaScript, so files are processed on your own device and never uploaded to a server. There is no sign-up, no file size limit imposed by the site, no watermark and no paid tier.

Price
Free — no account, no quota, no watermark
Category
Developer
Where it runs
In your browser, on your device
Files uploaded
None
Technology
plain JavaScript
Settings
2
Works offline
Yes, after the first visit

About Text to Hex Converter

Text becomes its UTF-8 bytes in hexadecimal. The four layouts exist because four different tools want it differently: space-separated for reading, continuous for pasting into a parser, `0x`-prefixed for dropping into C or JavaScript source, and a classic hex dump with offsets and an ASCII column for finding a specific byte in a structure. Non-ASCII characters expand — an emoji is four bytes, a CJK character is three — which the dump makes visible immediately.

How to use it

  1. Paste the text you want to run through text to hex converter.
  2. Set format and uppercase.

The 2 settings

SettingWhat it doesDefault
FormatChoose from 4: Space separated — 48 65 6C, Continuous — 48656C, Prefixed — 0x48, 0x65, Hex dump with offsets.Space separated — 48 65 6C
UppercaseOn or off. On by default.On

Under the hood

Runs onplain JavaScript — runs the whole thing
ControlsFormat, Uppercase

Questions

Why does one character produce more than two hex digits?

Because it is more than one byte. UTF-8 uses one byte for ASCII, two for most accented Latin and Greek, three for most CJK, and four for emoji and anything else beyond the Basic Multilingual Plane.

What is the ASCII column in the hex dump?

The same bytes shown as characters where they are printable, and a full stop where they are not. It is how you find a string inside binary data without decoding the whole thing — the same layout `xxd` and `hexdump -C` produce.

Is this the same as ASCII to hex?

For unaccented English text, identical — UTF-8 was designed so ASCII is a subset. For anything else it is not, and calling it ASCII would be wrong.