ASCII Converter
Convert text to character codes in decimal, hex, octal or binary — and decode any of them back. Code-point-correct (emoji & CJK safe), tolerant of prefixes & separators. Live, with a character inspector.
About this ToolHow it works, benefits & use casesTap to collapse
Turn text into numeric character codes — and decode codes back into text — in your choice of base. Encode each character to decimal (65), hexadecimal (41), octal (101), or binary (1000001), then format the list with a space, comma, newline, or no separator, optionally zero-padded to a fixed width and optionally prefixed with 0x, 0o, or 0b. The conversion is code-point-correct, so emoji and CJK characters are handled by their actual code point rather than being truncated. Decoding is tolerant: it splits on whitespace or commas, honors per-token 0x/0o/0b and \x prefixes (un-prefixed tokens use the base you select), skips invalid or out-of-range tokens while still decoding the rest, and names what it skipped. A live character inspector table lists each character with its decimal, hex, octal, and binary values plus its ASCII control name (NUL, TAB, SP, DEL, …). It all runs in your browser.
How to Use
- 1Choose "Encode (text → codes)" or "Decode (codes → text)" with the toggle.
- 2In Options pick the Base (decimal, hex, octal, or binary); when encoding also pick a Separator and optionally enable Zero-pad and Base prefix.
- 3Type or paste your text (or codes) — when encoding, the codes and a per-character inspector update live.
- 4When decoding, paste numbers with any mix of 0x/0o/0b/\x prefixes; un-prefixed tokens are read in the selected base.
- 5Click Convert, then copy, download, swap input ↔ output, or share the link.
Key Benefits
- Four bases for output: decimal, hexadecimal, octal, and binary
- Separator choices (space, comma, newline, none) plus optional zero-padding
- Optional 0x / 0o / 0b prefixes on encoded values
- Code-point-correct — emoji and CJK encode by their true code point
- Tolerant decoder honors per-token prefixes and skips invalid tokens, naming them
- Live character inspector with decimal, hex, octal, binary, and control names
- Two-way conversion with swap and a shareable URL
Common Use Cases
- Listing the decimal or hex codes of each character in a string
- Producing a binary or octal representation of text for low-level work
- Decoding a list of character codes copied from a forum or source file
- Looking up the control-character names (NUL, TAB, CR …) of bytes
- Mixing prefixed tokens (0x48, 0b1001000) in one decode pass
Options
Fixed width (dec 3, hex 2, oct 3, bin 8)
Prepend 0x / 0o / 0b (hex / oct / bin)
0 characters · live
Enter text above to see its character codes.
Was this tool helpful?
Share Your Experience
Help others discover this tool!
Related tools
- Binary to TextConvert binary to readable text
- Hash GeneratorGenerate MD5, SHA-1, SHA-256, SHA-512 hashes
- cURL to Code ConverterConvert cURL commands to code in various languages
- Code Block FormatterFormat code blocks for Markdown
- Color ConverterConvert between HEX, RGB, HSL, and HSV
- HTML to MarkdownConvert HTML to Markdown
You can encode and decode in decimal, hexadecimal, octal, and binary. When encoding, the Base dropdown sets the radix of every output value. When decoding, it sets the assumed radix for tokens that have no explicit prefix — tokens that do carry a 0x, 0o, or 0b prefix are read in their own base regardless of the dropdown.
No. Despite the name, encoding is code-point-correct, so characters beyond ASCII — accented letters, CJK, emoji — are converted by their full Unicode code point. Decoding maps each value back with String.fromCodePoint, so values well above 127 reconstruct the right character rather than being rejected.

