IT Market
Tools/Code/Data/Text to Hex Converter Online — Char Codes
Text → Hex

Конвертируйте текст в шестнадцатеричный формат

Tool guide

Text to Hex Converter Online — Char Codes

Sometimes a string has to be read as numbers instead of letters: to catch a non-breaking space posing as a normal one, to tell a hyphen from an em dash, to build a byte sequence for a UART device, or to prepare a constant for a disassembler. Type into Text Input and Hex Output fills with the character codes, space separated. The conversion runs in the browser and the text stays on your tab. See also: decode those hex bytes back to readable text, encode the same string as binary, convert a single number between bases.

How to use it

  1. Type or paste your string into Text Input; the empty field shows Hello World as a hint.
  2. Press Convert and Hex Output fills with space-separated character codes.
  3. Compare the number of groups with the number of characters — for plain Latin text they match exactly.
  4. Press Copy to lift the contents of Hex Output onto your clipboard.
  5. Press Clear before the next string; it wipes the input and the output together.

FAQ

Why do Cyrillic letters produce three digits instead of two?

The tool emits the character code JavaScript itself uses, not UTF-8 bytes. Latin characters fit in two digits, while Cyrillic sits above 255 — П becomes 41f and я becomes 44f. Those are valid character codes but not the bytes a file or network packet would contain, so do not use this output to build binary payloads for non-ASCII text.

Can I get the codes without spaces between them?

Not on the page — a single space is hard-coded as the separator and there is no format switch. Copy the output and strip the spaces with find-and-replace in any editor; the same pass adds 0x prefixes or commas if the result is going into C source.

How are line breaks and tabs handled?

They are characters too and get codes of their own: 0a for a line feed, 0d for a carriage return, 09 for a tab. Text copied out of a Windows editor shows 0d 0a at every line ending, which makes this a quick way to check what line endings a file actually uses.

Is the output uppercase or lowercase?

Always lowercase — 4a, never 4A — and there is no toggle. Hex casing carries no meaning and every parser accepts either, so if a document format demands uppercase, run the copied result through an uppercase transform.

How is this different from converting text to binary?

Both show the code of each character; only the base differs. Hex is four times shorter than binary, which is why dumps and debuggers use it, while binary is clearer when you care about individual bits and masks. A separate Text to Binary page covers that view.

Is the text I type stored anywhere?

No. The converter runs entirely in the browser, the string never leaves your tab, and nothing is written down. Clear empties both boxes and a reload does the same. There is no conversion history, so copy any result you want to keep.

Examples

Checking a config key byte by byte
Before: API_KEY
After: 41 50 49 5f 4b 45 59
Spotting a non-breaking space in pasted text
Before: a b
After: 61 a0 62 — the a0 instead of 20 reveals the non-breaking space