Ambimat GroupAmbimatAmbiSecureSIMAuthAmbiAutomationEngineering BlogAhmedabad · India · Est. 1982
Encoding utility

ASCII ↔ HEX Converter

Convert ASCII text into a hex byte sequence (or back). Choose your preferred separator. ASCII characters (0x20–0x7E) only — for multi-byte characters use the UTF-8 inspector.

Client-sideCopy-friendly0x20–0x7E

Input

Result

Type something to convert.
All conversion runs locally.

When to use this

For embedding strings into APDUs, building NDEF payloads, or converting between log captures and source code.

Multi-byte text?

For UTF-8 / Unicode use the UTF-8 inspector.

UTF-8 inspector →

Programmer formats?

For C / Java / Python / JS byte-array literals use HEX ↔ Bytes.

HEX ↔ Bytes →

Companion tool

Building APDUs?

APDU parser →

ASCII ↔ hex, and why it matters

This tool converts between human-readable text and its byte values shown in hexadecimal. Every character maps to one or more bytes; the hex view shows those bytes explicitly, which is invaluable when you are reading a protocol trace, a smart-card APDU log, or a hex dump and need to know what the bytes actually spell.

Worked example: the text AB is the two bytes 41 42 in hex (ASCII 0x41 = 'A', 0x42 = 'B'). Going the other way, 48 69 decodes to Hi. Note that non-ASCII characters depend on the text encoding — a character like é is one byte in Latin-1 but two bytes (C3 A9) in UTF-8, so confirm the encoding before trusting a conversion.

Frequently asked questions

Why do I get more hex bytes than characters?

Because non-ASCII characters are multi-byte in UTF-8. An emoji or an accented letter expands to several bytes, so the hex output is longer than the visible character count.

Can I paste hex with spaces or 0x prefixes?

Yes — the parser tolerates spaces and common separators. If you need strict byte grouping or prefixing, use the companion Hex ↔ Bytes formatter.

Is my input uploaded?

No. The conversion is done locally in your browser.

Which text encoding does the conversion assume?

UTF-8. That is why characters outside the ASCII range expand to more than one byte, and why a byte sequence that is not valid UTF-8 will not round-trip back to the same text.

Does hex output preserve leading zeros?

Yes. Every byte is rendered as exactly two hex digits, so 0x0A stays 0a rather than collapsing to a. This matters when the result is compared byte-for-byte against a key or hash.