Text to Hex Converter

Encode text to hex bytes in your browser with full UTF-8 support. Space-separated pairs, ready for code or protocols. Free, instant.

Text inputpaste, type, or drop a file
Hex output
Runs 100% in your browser. Nothing is uploaded, logged, or stored, and there are no ads. Verify it yourself: open your browser's Network tab while you convert and watch that no requests leave this page.

About this tool

Encode any text as hexadecimal bytes. The text is encoded as UTF-8 first, so accents, emoji, and non-Latin scripts produce their correct multi-byte sequences, then each byte is written as a two-digit hex pair separated by spaces.

Remove the spaces or add your own prefix (0x, \x) depending on what the destination expects; the pairs themselves are the universal part.

Common uses

  • Build hex string literals for tests, fixtures, or firmware.
  • See exactly which bytes a string occupies on the wire.
  • Prepare binary-safe values for protocols that expect hex encoding.

Automate via API

The same conversion is available as a REST endpoint for scripts, pipelines, and backends:

curl -X POST https://payloadly.com/api/v1/tools/text-to-hex \
  -H "Content-Type: text/plain" \
  -H "X-Api-Key: YOUR_API_KEY" \
  --data-binary @input.txt

API documentation · Get an API key

Hex notes

Hexadecimal (base 16) uses the digits 0-9 and a-f, so one hex digit represents exactly four bits. It is the standard notation for memory addresses, byte dumps, color codes, and hashes.

  • Hex values are case-insensitive; 0xFF and 0xff are the same number.
  • A leading 0x prefix is a convention, not part of the value.
  • Each hex digit maps to exactly one 4-bit nibble, which is why hex-binary conversion is mechanical.

Frequently asked questions

Is my data uploaded to a server?

No. This tool runs entirely in your browser using JavaScript, and there are no ads on the page. Nothing you paste or drop here is uploaded, logged, or stored, and you can verify that yourself: open your browser's developer tools and watch the Network tab while you convert (no requests leave the page), or disconnect from the internet after the page loads and keep working.

Why does one character sometimes produce several hex bytes?

The text is encoded as UTF-8 before hex conversion. ASCII characters are one byte each, but accented letters take two bytes and most emoji take four: the hex faithfully shows the real byte count, which is also why string length and byte length differ.

Is there a size limit or a fee?

The browser tool is free with no signup and comfortably handles files up to tens of megabytes (limited by your device's memory). For automated or bulk processing inside your own scripts and pipelines, use the paid REST API.

Related tools