Overview
Introduction
If you've got a list of legacy KeyboardEvent.keyCode numbers, logged from an old event handler or pulled from a compatibility table, turning them back into readable characters by hand means constant table lookups.
This tool decodes a space-separated list of keyCode numbers back into text in one pass, using the same US-QWERTY table its companion encoder uses.
What Is Keycodes to ASCII Converter?
A reverse lookup for legacy JS KeyboardEvent.keyCode values: given a keyCode number, it returns the character on a US QWERTY keyboard that key represents.
Because keyCode only identifies a physical key, not a shifted character, every letter decodes to its uppercase form, a real and documented limitation of the source data, not a shortcut this tool takes.
How Keycodes to ASCII Converter Works
The input is split on whitespace into individual numeric tokens, each of which is validated as a non-negative integer before being looked up in a reverse table built directly from ASCII to Keycodes Converter's forward mapping.
Digits and OEM punctuation decode to one specific character each; the letter range decodes only to uppercase, since the forward table's lowercase entries are intentionally excluded when building the reverse lookup to avoid an arbitrary case guess.
When To Use Keycodes to ASCII Converter
Use it to quickly read back a batch of keyCode numbers captured from legacy keyboard-handling code without decoding each one manually.
It's also handy for verifying an ASCII to Keycodes Converter round trip, understanding upfront that case information won't survive the round trip.
Often used alongside ASCII to Keycodes Converter, Scan Codes to ASCII Converter and ASCII to Hex Converter.
Features
Advantages
- Decodes an entire sequence of keyCode numbers in one pass instead of looking each one up individually.
- Explicitly documents the uppercase-only limitation instead of silently guessing at case.
- Uses the exact same table as its encoder companion, so the two tools never drift out of sync.
Limitations
- Cannot recover the original letter case; every decoded letter comes out uppercase regardless of whether the source event was shifted.
- Only recognizes the digits, letters, space, and 11 OEM punctuation keyCodes documented in the encoder's table; any other number is rejected.
Examples
Best Practices & Notes
Best Practices
- Don't rely on this tool's output to recover exact original text if case matters; treat the uppercase result as "which keys were pressed," not "exactly what was typed."
- If your keyCode sequence came from a non-US layout, be aware the physical-key-to-character mapping this tool assumes may not match what that layout actually produced.
Developer Notes
The reverse table is derived from ascii-to-keycodes-converter's ASCII_TO_KEYCODE map by filtering out lowercase letter entries before inverting it, so both tools share one source of truth and a-z can never accidentally become the "canonical" decode target instead of A-Z.
Keycodes to ASCII Converter Use Cases
- Reading a batch of keyCode numbers logged from a legacy keydown handler
- Cross-checking documentation or Stack Overflow answers that list keyCode numbers instead of characters
- Demonstrating, concretely, how much information keyCode discards compared to the actual character typed
Common Mistakes
- Expecting lowercase letters back out; keyCode-based decoding can only ever produce uppercase, this is a property of the source data.
- Feeding in decimal ASCII codes instead of keyCode numbers; despite overlapping in the digit range, letter keyCodes (65-90) don't line up with lowercase ASCII codes (97-122) the way you might expect.
Tips
- The error message names the exact unrecognized keyCode and its position, so you can spot a typo or an out-of-scope key fast.
- Encode your own test string with ASCII to Keycodes Converter first if you want a guaranteed-valid keyCode sequence to experiment with here.