Converter Web ToolsConverter WebTools

Encode String to Hex (Base16)

Encode text to Hex quickly and privately. The conversion runs in your browser.

Input
Output
Share Link
Settings

What is Hex?

Hexadecimal (Base16) encoding represents each byte of data as two hexadecimal digits (0–9 and a–f). It is a compact, human-readable way to view and transmit binary data — every byte from 00 to FF maps to a fixed two-character code. Hex is widely used to display hashes, colors, machine code and raw bytes. This tool converts text into its hexadecimal representation instantly in your browser.

Runs locally: hex encoding happens in your browser. It is a reversible representation, not encryption.

How Hex works

Hex encoding maps every byte to exactly two characters from 0–9 and a–f:

  1. The text is converted to bytes (UTF-8).
  2. Each byte (0–255) is split into two 4-bit halves.
  3. Each half (0–15) becomes one hex digit — for example H = 72 = 0x48, i = 105 = 0x69, so Hi becomes 4869.

How to use

  1. Enter or paste your text in the input box.
  2. The Hex-encoded result appears instantly in the output.
  3. Click Copy to use the encoded value.

Examples

InputHex
A41
Hi4869
hello68656c6c6f
©c2a9

Options explained

  • Case — Output hex in lowercase (a–f) or uppercase (A–F).
  • Separator — Optionally insert spaces or another delimiter between byte pairs for readability.
  • Character set — Text is read as UTF-8 bytes before being converted to hex.

Common uses

  • Inspecting raw bytes, hashes and binary data in a readable form.
  • Representing colors (for example #ff8800) and byte values.
  • Embedding binary in text formats and debugging protocols.
  • Converting between text and machine-level byte representations.

Frequently asked questions

What is hex encoding?
Representing bytes in Base16 — two hexadecimal digits per byte, using 0–9 and a–f.
Is hex encoding encryption?
No. It is a reversible representation with no security.
How do I decode hex?
Use the Hex Decode tool to convert it back to the original data.
Why is each byte two characters?
A byte holds 256 possible values, which is exactly two hex digits (16 × 16 = 256).