EditSafely

UTF-8 Encode a String

Encode a string as its UTF-8 bytes in hexadecimal. Runs entirely in your browser, so your data never leaves your device.

0 chars · 0 lines

Output

The result appears here as you type.

Options

How to use UTF-8 Encode a String

  1. 1. Paste the string. Enter any text into the input pane, including accented letters, symbols, or emoji. UTF-8 Encode a String converts each character into its raw bytes in hexadecimal.
  2. 2. Set the Separator. Set the Separator to a space or another character to join the hex byte values, matching the format your target tool, packet builder, or document expects.
  3. 3. Choose the Hex case. Set Hex case to Lowercase or Uppercase depending on the convention used by the system you are working with, since some hex dump tools expect one style consistently.
  4. 4. Copy the hex bytes. Copy the resulting sequence of hex bytes out of the output pane, ready to use in a binary protocol, hex editor, or documentation of the encoded string.

When to use UTF-8 Encode a String

UTF-8 Encode a String converts text into its raw UTF-8 bytes shown in hexadecimal, with a choice of separator and letter case. Use it whenever you need to see or produce the exact byte sequence a string encodes to.

  • Building a packet payload by hand. You are constructing a network packet manually and need the exact UTF-8 byte sequence for a text field to embed into the raw packet data.
  • Verifying a multi-byte character's byte count. You want to confirm how many bytes a specific character, such as an emoji or accented letter, takes up under UTF-8 before relying on that assumption in code.
  • Matching a hex dump tool's letter case. You are comparing encoded bytes against output from another tool that always uses uppercase hex, and setting Hex case to match avoids a false mismatch during comparison.
  • Documenting an API's exact wire format. You are writing protocol documentation and need to show the literal bytes a sample string produces on the wire, so readers can verify their own implementation against it.

Examples

Encode

Input

Output

41 c3 89

About the UTF-8 Encode a String tool

UTF-8 Encode a String does its work locally, right in the browser. Encode a string as its UTF-8 bytes in hexadecimal. There is no upload step, no queue and no account, and your data never travels over the network.

It belongs to the String Tools collection on EditSafely, a set of 159 small, focused String utilities that share the same instant, private workspace.

You can shape the output with 2 settings, including Separator and Hex case, and the result refreshes the moment you change one. A worked example further down the page shows exactly what the tool produces for a real input.

Running locally also makes the tool fast and dependable: results appear as you type or drop a file, there is no server outage that can take it down mid-task, and confidential data can be processed without a second thought.

Frequently asked questions

Is UTF-8 Encode a String free to use?

Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.

Is it safe to paste sensitive or confidential data?

Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.

How much text can I process at once?

There is no fixed limit. Because the work happens on your own device rather than on a shared server, the practical ceiling is your machine's memory, which comfortably handles inputs far larger than typical online tools allow.

Do I need to sign up or install anything?

No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.

How do I use the result?

The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.