ascii-to-decimal
Converting ASCII to decimal turns each character into its numeric code: A β 65, a β 97, space β 32. ASCII covers the first 128 code points (0-127); for non-ASCII characters use Unicode-aware tools. Useful for low-level programming (storing strings as int arrays), quick character-code lookups, and teaching how strings are stored in memory. The ZTools ASCII to Decimal converter takes any text, outputs the decimal codes per character, and supports separators (space, comma, newline) and reverse direction.
Use casesβ
Look up a character codeβ
"What's the ASCII code for tab?" β 9. Tool gives the answer in one step.
Convert a string for embedded codeβ
C/C++ string literals can be int arrays. "abc" β {97, 98, 99}.
Verify character escape sequencesβ
Newline \n is decimal 10. Tab \t is 9. Tool confirms the codes.
Teach how computers store textβ
Show students each character's numeric code β concrete intuition for "everything is bytes".
How it worksβ
- Paste text β Any ASCII string. Non-ASCII characters flagged.
- Convert β String.charCodeAt() per character. Output array of decimals.
- Pick format β Comma list (65, 97, 32), space-separated, newline per char, JSON array.
- Reverse β Toggle direction to go from decimals back to text.
Examplesβ
Input: "ABC"
Output: 65, 66, 67.
Input: "Hello!"
Output: 72, 101, 108, 108, 111, 33.
Input: "\n\t"
Output: 10, 9 (newline, tab).
Frequently asked questionsβ
What about non-ASCII characters?
Above 127 is non-ASCII. Use Unicode-to-UTF-8 for proper encoding. JavaScript string.charCodeAt returns UTF-16 code units, which differ from "ASCII decimal" for non-ASCII chars.
Extended ASCII (128-255)?
Tool handles these but flags them as locale-dependent (Latin-1 vs Windows-1252 vs ISO-8859-X).
Privacy?
All in browser.
Tipsβ
- For non-English text, prefer Unicode tools β ASCII only covers basic Latin.
- For embedded C arrays, output as comma-separated int list β pastes directly into source.
- For escape-sequence references, common values: 9 (tab), 10 (LF), 13 (CR), 32 (space), 127 (DEL).
Try it nowβ
The full ascii-to-decimal runs in your browser at https://ztools.zaions.com/ascii-to-decimal β no signup, no upload, no data leaves your device.
Last updated: 2026-05-06 Β· Author: Ahsan Mahmood Β· Edit this page on GitHub