What it does
Converts plain text into its ASCII decimal codes, binary representation, or hexadecimal representation — and back again. Handy for debugging encodings, understanding how characters are stored, crafting payloads, or just satisfying curiosity about what's "under the hood" of a string of text.
Everything runs entirely in your browser — nothing you type is ever sent anywhere.
Try it
How it works
- Text → Format: each character in the input text is read as a Unicode code point (via
charCodeAt), then rendered as:
- Binary: 8-bit zero-padded binary string, space-separated (e.g.
H→01001000) - Hexadecimal: 2-digit zero-padded hex, space-separated (e.g.
H→48) - ASCII (decimal): the raw decimal code point, space-separated (e.g.
H→72)
- Format → Text: the reverse — the tool splits the input on whitespace, parses each chunk according to the selected format (base 2, base 16, or base 10), and converts each resulting number back into a character with
String.fromCharCode. - Extended characters (code point > 127, i.e. non-ASCII/Unicode) are still supported for binary/hex/decimal conversion, even though strictly "ASCII" only covers 0–127 — this makes the tool usable for basic Unicode text too, not just strict 7-bit ASCII.
Examples
| Text | Binary | Hex | ASCII (decimal) |
|---|---|---|---|
A | 01000001 | 41 | 65 |
Hi | 01001000 01101001 | 48 69 | 72 105 |
! | 00100001 | 21 | 33 |
Notes
- Multiple spaces or newlines between groups are tolerated when decoding.
- Decoding binary requires groups of 1–8 bits (interpreted as one byte each); decoding hex requires 1–2 hex digits per group.
- Invalid input (non-numeric groups, out-of-range values) is reported in the status line rather than silently producing garbage output.