Text

Text to Hex Converter

Details

How to use Text to Hex Converter

What the tool does, how to run it, and what to expect from the result.

How to convert text to hex

Type or paste your text and the hex bytes appear immediately, two lowercase digits per byte. Nothing is uploaded, the encoding happens in the page.

The encoder is UTF-8, so plain English gives one byte per character while accents, symbols and emoji give two to four. The result is byte-for-byte what the same text would look like on disk.

  • Type or paste the text, for example Hello.
  • Read the hex output, for example 48 65 6c 6c 6f.
  • Count the pairs if you want the byte length of the string.
  • Compare against a hex editor to verify a file's contents.
  • Press Copy result to take the hex bytes away.

Why hex is the default way to write bytes

A hex digit represents exactly four bits, so a byte is always two digits with no padding decisions to make. That alignment is the whole reason hex displaced octal for byte-level work: three bits per octal digit does not divide into eight, which is why octal file modes read cleanly but octal memory dumps do not.

It is also compact. The same byte is eight characters in binary, up to three in decimal, and always two in hex, which is why every hex editor, protocol trace, and memory dump uses it. Reading a hex pair back into bits is mechanical once you know the sixteen digits, and the high digit tells you the top nibble at a glance: anything from 00 to 7f is a plain ASCII character, and anything from 80 up is part of a multi-byte UTF-8 sequence.

  • Space 20, tab 09, newline 0a, carriage return 0d.
  • Digits 0 to 9 are 30 to 39; A to Z are 41 to 5a; a to z are 61 to 7a.
  • Any byte from 80 to ff belongs to a multi-byte UTF-8 sequence.

Checking a file or a payload byte by byte

The practical use for this is verification. When a file will not parse, an API rejects a string, or a checksum disagrees, the question is usually whether the bytes on disk are the bytes you think they are. Encoding the expected text here and comparing against a hex editor answers that directly, because both are showing UTF-8 bytes in the same notation.

Two things show up constantly in that comparison. A file that begins ef bb bf carries a UTF-8 byte-order mark before your first real character, which breaks strict parsers. And a line that ends 0d 0a rather than 0a has Windows line endings, which is the usual explanation for a trailing carriage return that no editor will show you.

Tips

Getting a better result out of Text to Hex Converter

Specific settings and thresholds, not general advice.

  • Each byte becomes exactly two lowercase hex digits, space separated. Hello becomes 48 65 6c 6c 6f.
  • Hex is a compact spelling of binary, four bits per digit, which is exactly why an 8-bit byte is always two hex digits and never one or three.
  • The encoder is UTF-8, so an accented letter is two bytes (e is c3 a9), a euro sign is three (e2 82 ac), and an emoji is four (f0 9f 98 80).
  • Handy anchors: a space is 20, a newline is 0a, a tab is 09, capital A is 41, and lowercase a is 61.
  • The output matches what a hex editor or xxd shows for the same text saved as a UTF-8 file, so you can use it to check a file byte for byte.
Limits

What Text to Hex Converter does not do

The honest boundary, so you do not lose time finding it yourself.

  • Lowercase output only, there is no uppercase toggle.
  • No 0x prefixes, commas, or backslash escapes in the output.
  • UTF-8 only, with no encoding picker.
  • Text input only, it does not read files.
At a glance

Who Text to Hex Converter is for

A quick way to understand who this helps, what it solves, and where it connects next.

Best fit

Developers, students, and engineers who need a quick, reliable text to hex converter.

Ideal for

Fast Text to Hex conversion without a backend, install, or sign-up.

FAQ

Common questions

Short answers for the questions people usually have before trying a utility like this.

Does my data get uploaded anywhere?

No. Everything runs locally in your browser and nothing is sent to a server.

Is this free to use?

Yes. It is completely free, with no account, no signup, and no usage limits.

Does it work on a phone?

Yes. The page runs in any modern mobile browser, on iPhone and Android alike, with no app to install.

Why is every character two hex digits?

Because a byte is 8 bits and a hex digit is 4 bits, so two digits cover a byte exactly. That is the whole reason hex won over octal for byte-level work: the alignment is perfect and never needs padding.

Is the output the same as xxd or a hex editor?

Yes, for text saved as UTF-8. The tool encodes exactly the bytes that would be written to disk, so 48 65 6c 6c 6f is what you would see in the hex column for a file containing Hello with no trailing newline.

Why does an accented letter produce two hex bytes?

Because UTF-8 encodes anything outside the ASCII range in more than one byte. The letter e with an acute accent is c3 a9, two bytes. Its Unicode code point is U+00E9, but the code point and the UTF-8 bytes are different things.

Can I get uppercase hex?

Not from this tool, which always prints lowercase. Hex is case-insensitive, so 6c and 6C are the same byte. Uppercase the copied output if your target format expects it.

What is the hex for a space, a tab, and a newline?

A space is 20, a tab is 09, and a newline (line feed) is 0a. A Windows line ending is two bytes, 0d 0a, so text pasted from a Windows file may show 0d bytes you did not expect.

What is "Hello" in hex?

48 65 6c 6c 6f. Those are the bytes 72, 101, 108, 108, 111 in base sixteen, one pair per character because every letter is inside the ASCII range. Add a trailing newline and a sixth pair, 0a, appears.

Can I convert the hex back to text?

Yes, with the companion Hex to Text converter. It accepts the pairs with or without spaces and strips 0x prefixes, but it requires an even number of hex digits, since an odd count cannot describe whole bytes.

Is the output the same as a hex dump of a file?

The byte values are identical for the same text saved as UTF-8. What differs is the layout: a dump from xxd or a hex editor adds an offset column on the left, groups bytes into columns, and prints an ASCII gutter on the right. This page prints only the byte stream, space separated.

Recommendations

You Might Also Like

Nearby tools from the catalog that fit the same job or workflow.

Cleanor app

Do it all on your device

Cleanor puts these tools in one app: compress and convert images, video, and audio, work with PDFs, and scan text right on your device. Plus free up storage and clear inbox clutter with Email Cleaner. Start with a free trial.

  • iPhone
  • Android
  • Macsoon
  • Windowssoon