Skip to content

Text to Hex

Convert text into hexadecimal bytes.

Quick Tool Overview

Text to Hex produces the UTF-8 hexadecimal bytes a hex editor would show for your text, formatted the way you need it — space separated for reading, 0x prefixed for source code, or unseparated for comparing against a hash.

What it does
Converts text into hexadecimal bytes
You give it
A value, key, string or document
You get back
The hex bytes with a byte count
Best for
Debugging, source code literals and byte comparison
Text Tools Free, unlimited use No sign-up Runs in your browser

About the Text to Hex

Hexadecimal is the format every programmer reads bytes in, because two hex digits are exactly one byte and the mapping is easy to hold in your head in a way that eight binary digits is not.

This produces the UTF-8 hex bytes a hex editor would show for your text, formatted the way you need it: space separated for reading, unseparated for a hash comparison, prefixed with 0x or \x for pasting into source code, or comma separated for a byte array. Upper and lower case are both available, since different tools and languages have different conventions and a mismatch makes two identical values look different.

Key features of the Text to Hex

Formats for real destinations

Space separated, comma separated, 0x prefixed or \x prefixed — each matching where the hex is going.

Upper or lower case

Because a string comparison between two hex values is case sensitive even though the value is not.

True UTF-8 bytes

What a hex editor would show, so an accented letter correctly produces two bytes rather than one.

Byte count alongside

The figure a size limit actually measures, shown next to the character count for comparison.

Reverses cleanly

Any format produced here is read back by the Hex to Text tool without editing.

How to use the Text to Hex

  1. 1

    Type or paste your text

    A value, a key, a string or a whole document.

  2. 2

    Choose the format

    Space separated for reading, 0x prefixed for source code, or unseparated for comparison.

  3. 3

    Pick the case

    Upper or lower case hex digits, to match whatever you are comparing against.

  4. 4

    Copy the hex

    The byte count is shown alongside, which is the figure a size limit actually measures.

Frequently asked questions

The value is not — FF and ff are the same byte. But a string comparison between two hex representations is, which is why two identical hashes can look different when one tool outputs upper case and another lower.

Reviews of the Text to Hex

What people who use the Text to Hex think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Text to Hex. It takes half a minute and no account.

Write the first review

More text tools