Hex Encoder / Decoder

Convert text to a hexadecimal string, or decode hex back to text — with byte delimiters, uppercase, and 0x / \x prefixes. Decoding ignores spacing and prefixes, so any format round-trips. Runs entirely in your browser, no server, no sign-up.

Result

What this tool does

Convert any text to a hexadecimal string, or decode a hex string back to the original text — instantly, right in your browser. Nothing is sent to a server: it runs locally, works offline, and needs no sign-up. Pick a Mode, then optionally choose a byte delimiter, uppercase digits, or a per-byte prefix.

Modes

ModeWhat it does
encode (default)Turns your text into hex — e.g. Hi becomes 4869 (each byte is two hex digits).
decodeReverses it — turns a hex string back into the original text. Decoding is case-insensitive and ignores whitespace, delimiters, and 0x / \x prefixes.

Formatting options (encode)

OptionWhat it doesExample
Byte delimiterInserts a separator between bytes — none (default), space, colon, dash, comma, or newline.Hi · colon → 48:69
Uppercase hexEmits uppercase A–F digits instead of lowercase.éC3A9
Per-byte prefixAdds 0x or \x before each byte.Hi · 0x + space → 0x48 0x69

Mix and match freely — e.g. a space delimiter plus the 0x prefix gives the classic 0x48 0x69 0x21 C-array style.

Decode output — text or raw bytes

FormatWhen decoding
text (default)Renders the bytes as UTF-8 text (errors if they aren't valid UTF-8)
bytesShows the decoded bytes as a plain lowercase hex byte string — use this for binary data that isn't readable text

Examples

InputSettingsOutput
Hiencode4869
Helloencode · space delimiter48 65 6c 6c 6f
Helloencode · colon · uppercase48:65:6C:6C:6F
Hiencode · 0x prefix · space0x48 0x69
4869decodeHi
48:65:6c 6c 6fdecodeHello
c3a9decodeé

FAQ

Is it free and private?

Yes — your input never leaves your device, and it keeps working offline once the page has loaded.

What encoding does it use for text?

Text is read and written as UTF-8, so accented letters and emoji become their multi-byte UTF-8 sequences (éc3a9).

Can I paste hex with spaces or colons?

Yes. Decoding ignores ASCII whitespace, the : - , delimiters, and 0x / \x prefixes, so a string copied from a hex dump, a 0x-prefixed C array, or a \x-escaped string all decode without editing.

My decoded output looks garbled.

The bytes probably aren't UTF-8 text. Switch the Decode output to bytes to see the raw hex instead.

Lowercase or uppercase?

Lowercase is the default and the most common in tools and protocols. Toggle Uppercase hex when a spec or system expects A–F caps.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool hex-codec "Hello, world!"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/hex-codec/?input=Hello%2C%20world%21&mode=encode&format=text&delimiter=none&uppercase=true&prefix=none

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.