Dev Utilities
Convert text to hex bytes separated by spaces
ASCII to hex converter writes each byte of your text as two hex digits separated by spaces: Hello becomes 48 65 6c 6c 6f, the form found in hex dumps and byte listings. The text is converted to UTF-8 first, so é becomes c3 a9 and an emoji four bytes, and every byte is padded to two digits, so a newline is 0a. Output is lowercase with no 0x prefix. Developers use it to prepare values for hex editors and packet builders, and as the input for the Hex to ASCII tool.
How to use ASCII to Hex
- Open ASCII to Hex in the Toolbox101 app.
- Type or paste the text you want converted into the
Inputbox. - Read the
Outputbox: one two-digit hex byte per byte of text, separated by spaces and in lowercase, soHellobecomes48 65 6c 6c 6f. - Click
Copyto keep the byte list, or feed it straight into the Hex to ASCII tool to reverse it.
Worked example
ASCII to Hex returns the output below for this input.
Input
Hello worldOutput
48 65 6c 6c 6f 20 77 6f 72 6c 64Check it yourself: open ASCII to Hex and enter the same input.
Frequently asked questions
How is this different from the Hex Encode tool?
Same bytes, different layout. Hex Encode prints one contiguous string (68656c6c6f); this tool puts a space between bytes (68 65 6c 6c 6f). Pick the format your downstream tool expects.
Why do control characters print with two digits?
Every byte is zero-padded to two digits, so a newline is 0a and a tab is 09. That keeps the list aligned and unambiguous, and the Hex to ASCII decoder reads it back.
Does it match xxd for non-ASCII text?
Yes. Both write the UTF-8 bytes, so é is c3 a9 and an emoji takes four bytes. For plain ASCII text there is one byte per character.
Can I get a C-style array instead?
Use the Text to Hex Array tool for 0x48, 0x65, 0x6c style output that you can paste into C, Rust or JavaScript source.
Use ASCII to Hex now
Runs in your browser. Nothing you type is uploaded.