Text to Hex

Convert Unicode text into UTF-8 bytes and format those bytes as hexadecimal values.

Accented characters, non-Latin scripts, symbols, combining marks, and emoji may use multiple UTF-8 bytes.

Your text is processed in this browser and is not submitted to UnicodeNow.

Processed locally in your browser

This tool encodes Unicode text as UTF-8 bytes and formats each byte as hexadecimal. The output is a byte sequence, not a list of Unicode code points. For notation such as U+00E9 or U+1F600, use Text to Unicode Code Points.

é: Unicode code point U+00E9, UTF-8 bytes C3 A9. 😀: Unicode code point U+1F600, UTF-8 bytes F0 9F 98 80.

Output represents UTF-8 bytes, not Unicode code-point notation.

Continuous hexadecimal forces no separator. \x output defaults to no separator when Space is selected.

Advanced options

Normalization changes the Unicode sequence before UTF-8 encoding and therefore changes the hexadecimal output.

For U+ notation, use Text to Unicode Code Points.

Output represents encoded UTF-8 bytes. It is not a character list.

Open Hex to Text

For manageable input sizes, this table shows one row per code point.

What this Text to Hex tool does

This page uses the pipeline Unicode text → UTF-8 bytes → hexadecimal. The browser receives a JavaScript string, optionally normalizes it only when you choose a normalization form, encodes it with TextEncoder, then formats each resulting byte as two hexadecimal digits. Processing runs locally in your browser.

The tool is intentionally one-way. It does not decode hex on this route. Use Hex to Text when you need to parse hexadecimal bytes back into strict UTF-8 text.

Text characters vs UTF-8 bytes

ASCII makes text look byte-sized because A encodes as one byte, 41. Unicode text is broader. é encodes as C3 A9, as E2 82 AC, and 😀 as F0 9F 98 80. A visible character can also contain several code points, such as a base letter plus a combining mark or an emoji sequence joined with a zero-width joiner.

UTF-8 hex examples

TextCode pointUTF-8 hex
AU+004141
éU+00E9C3 A9
U+20ACE2 82 AC
ЖU+0416D0 96
U+4E2DE4 B8 AD
😀U+1F600F0 9F 98 80

Output formats

48 65 6C
48656C
0x48 0x65 0x6C
\x48\x65\x6C

Byte pairs are the default because they are easy to scan and paste into byte-oriented tools. Continuous hexadecimal is compact. 0x-prefixed bytes are useful in source-code and debugging contexts where each byte should be explicit. \x-prefixed output is useful for byte escape notation. Hexadecimal casing controls the digits only; prefixes stay conventional as 0x and \x.

Hex bytes vs Unicode code points

C3 A9 and U+00E9 describe different layers. U+00E9 is the Unicode code point for é. C3 A9 is how that code point is encoded as UTF-8 bytes. If you need code-point notation, use Text to Unicode Code Points; if you need byte values for files, payloads or fixtures, use this page.

Do not convert the hexadecimal digits in a code point directly into bytes. U+1F600 is a Unicode scalar value, while F0 9F 98 80 is the UTF-8 byte sequence that represents it. The byte-oriented output from this page is appropriate for encoders, decoders, protocols and tests that expect actual UTF-8 bytes.

Unicode normalization and byte output

Normalization is off by default because encoding text as UTF-8 does not require changing the Unicode sequence. With normalization off, precomposed é becomes C3 A9, while decomposed e plus U+0301 becomes 65 CC 81. If you explicitly choose NFC, the decomposed sequence may normalize to the precomposed form and produce C3 A9.

Invisible and control characters

Tabs, line breaks, carriage returns, combining marks, zero-width joiners, variation selectors, bidirectional controls and zero-width spaces are preserved and encoded. The tool warns when invisible Unicode characters are present because they can affect byte counts and equality checks while remaining hard to see in the input field.

How to use the tool

  1. Paste or type text into Input text.
  2. Choose an output format.
  3. Choose a separator where the format supports one.
  4. Select uppercase or lowercase hexadecimal digits.
  5. Leave normalization off unless you intentionally want to change the Unicode sequence before encoding.
  6. Review the byte statistics and diagnostics, then copy or download the result.

Privacy and processing

This tool runs in your browser. Your input is not submitted to UnicodeNow. Output is written into textareas, and downloads use Blob URLs that are revoked after use.

Common uses

Example

Input text:

Hello, café 😀

UTF-8 hex:

48 65 6C 6C 6F 2C 20 63 61 66 C3 A9 20 F0 9F 98 80

Frequently asked questions

What does Text to Hex mean?

It encodes text as bytes and displays each byte in hexadecimal.

Does each character become one hex byte?

No. UTF-8 characters may use one to four bytes, and a visible character can contain multiple code points.

Why does é become C3 A9?

Because UTF-8 encodes Unicode code point U+00E9 using two bytes: C3 A9.

Why does emoji use four bytes?

Many emoji are supplementary Unicode code points, and each supplementary code point uses four UTF-8 bytes.

What is the difference between UTF-8 hex and Unicode code points?

UTF-8 hex represents encoded bytes. U+ notation represents Unicode code points.

Can I output continuous hex?

Yes. Select Continuous hexadecimal to produce output such as 48656C6C6F.

Can I use 0x prefixes?

Yes. Select 0x-prefixed bytes to prefix each byte individually.

Can I use lowercase hex?

Yes. Change Hexadecimal casing to Lowercase.

Does normalization change the result?

It can. Normalization may change the Unicode sequence before UTF-8 encoding.

Are tabs and line breaks encoded?

Yes. Tabs, line feeds and carriage returns are preserved and encoded as bytes.

Does this tool preserve invisible characters?

Yes. Invisible characters are preserved and encoded unless you change the input.

What happens with an unpaired surrogate?

Encoding is rejected rather than silently replacing the surrogate with U+FFFD.

Is my text uploaded?

No. This tool runs in your browser and does not submit input to UnicodeNow.

Related tools

Hex to Text

Decode hexadecimal byte values into UTF-8 text.

EncodingProcessed locally

Text to Binary

Convert UTF-8 text bytes into binary byte groups.

EncodingProcessed locally

Byte Length Calculator

Count UTF-8 bytes, code points, grapheme clusters and UTF-16 code units for text.

EncodingProcessed locally

Text to Decimal

Convert text to decimal byte values or Unicode code points.

EncodingProcessed locally

Unicode Character Inspector

Inspect each Unicode character, encoding, category, script and normalization form.

UnicodeProcessed locally

Unicode Sequence Analyzer

Analyze code points, grapheme clusters, bytes, scripts and directionality.

UnicodeProcessed locally

Related guides

Unicode vs UTF-8

Unicode defines characters and code points. UTF-8 encodes those code points as bytes for files, databases, web pages, APIs and network messages.

What Is a Unicode Code Point?

Learn what Unicode code points are, how U+ notation works, and how code points differ from glyphs, bytes, code units and visible characters.

Unicode Normalization Explained

Learn NFC, NFD, NFKC and NFKD, canonical and compatibility equivalence, and safe normalization for comparison, search and identifiers.

How to Fix Broken UTF-8 Text

A safe workflow for diagnosing broken UTF-8, validating bytes, reversing mojibake, handling double encoding and auditing repairs.