Skip to main content
TOP free online tools Your Workbench
English

Hex Encoder / Decoder

Encode text to hexadecimal and decode hex back to text in your browser. Free, online, no upload, fully private.

Local browser processing — zero server uploads

How to Use

  1. Paste or type your text or hex into the Hex Encoder / Decoder input area above.
  2. Configure any format or mode options to generate the hex or text in real time.
  3. Click Copy to copy the formatted result to your clipboard, or Reset to clear the workbench.

What is Hex Encoder / Decoder?

A Hex Encoder / Decoder converts plain UTF-8 text into hexadecimal byte strings and decodes hexadecimal data back into readable text. Programmers, security analysts, and embedded engineers use hex representation to inspect raw UTF-8 byte sequences, packet payloads, and binary-safe logs.

How It Works

In Encode mode, TextEncoder converts your input string into UTF-8 bytes and maps every byte to a two-digit lowercase hex code (b.toString(16).padStart(2, "0")). In Decode mode, the tool strips any non-hex characters (/[^0-9a-fA-F]/g), verifies an even character count, parses each two-character byte via parseInt(..., 16) into a Uint8Array, and decodes UTF-8 text with TextDecoder locally.

Common Use Cases

  • Inspecting multi-byte UTF-8 characters — check the exact hex bytes produced by accents, CJK characters, or emojis
  • Decoding hex dumps from network logs — paste spaced or delimited hex values (non-hex chars stripped automatically) to read text
  • Debugging serial or binary protocols — convert ASCII/UTF-8 command strings to hex payloads in real time
  • Switching bidirectionally without losing input — toggle Encode and Decode to reprocess the active text immediately
Technical Details

Encoding: TextEncoder UTF-8 bytes to lowercase 2-char hex (padStart(2, "0")). Decoding: strips /[^0-9a-fA-F]/g, requires even hex digit count, parses byte pairs into Uint8Array via TextDecoder. Updates live on every keystroke locally.

FAQ

Is my data uploaded?

No. All encoding and decoding happens locally in your browser using TextEncoder. Your data never leaves your device.

What format is the hex output?

Each byte is represented as a two-character hexadecimal value. The output is lowercase by default.