Hex Encoder & Decoder Online — Text to Hex Bytes Converter
Convert any text to its hexadecimal byte representation, or decode a hex string back to readable text. Choose between space-separated, comma-separated, or unbroken output, switch between uppercase and lowercase, and toggle `0x` prefixes for C-style byte literals. The converter runs in your browser — perfect for inspecting binary payloads, debugging protocols, or generating fixtures.
Features
Configurable formatting
Spaces, commas, or no separator; uppercase or lowercase; with or without `0x` prefix.
UTF-8 aware
Multi-byte characters (emoji, CJK) are encoded correctly as UTF-8 byte sequences.
Decode tolerant input
Whitespace, `0x` prefixes, and commas are ignored when decoding — paste any hex dump.
Runs locally
No upload. Safe for protocol traces, signatures, and binary blobs.
How to convert text to hex online
Encode or decode hexadecimal byte strings in four steps.
- Choose directionPick Encode (text → hex) or Decode (hex → text).
- Pick a separatorChoose space, comma, or no separator depending on what your target format expects.
- Paste your inputDrop text into the encoder, or a hex string (any common formatting) into the decoder.
- Copy or downloadCopy the result to clipboard, or download as a file for larger byte dumps.
Examples
Encode ASCII text
Hello
48 65 6c 6c 6f
Encode UTF-8 text
café
63 61 66 c3 a9
The accented `é` is encoded as the two UTF-8 bytes `c3 a9`.
Decode a hex dump
0x44 0x65 0x76
Dev
Frequently Asked Questions
- What is hex encoding used for?
- Hex makes binary data visible — useful for protocol analysis, embedded firmware fixtures, cryptographic signatures, and debugging anywhere bytes need to be readable in source or logs.
- How is hex different from Base64?
- Both turn binary into text. Hex uses 2 characters per byte (50% efficiency) and is human-readable. Base64 uses 4 characters per 3 bytes (~75% efficiency) but is harder to read.
- Does it handle multi-byte characters?
- Yes. The encoder converts the input to UTF-8 first, so emoji, CJK, and accented characters produce the correct multi-byte hex sequences.
- Can I paste hex with `0x` prefixes or whitespace?
- Yes. The decoder strips whitespace, commas, and `0x` prefixes automatically — paste any common hex-dump format.
- Is my data sent to a server?
- No. Encoding and decoding happen locally in your browser.