Javascript Keycode Reference
KeyboardEvent.keyCode is the old numeric code browsers assigned to each key, such as 13 for Enter, 27 for Escape, and 65 for the letter A.
- Runs in your browser No upload — everything runs on your device.
- No sign-up, no watermark Free to use, no account needed.
- Files never uploaded Nothing leaves your device.
- 5,400+ tools, one site File, unit and currency tools in one place.
KeyboardEvent.keyCode is the old numeric code browsers assigned to each key, such as 13 for Enter, 27 for Escape, and 65 for the letter A. This tool looks a key up in both directions: type a key name such as Enter, ArrowLeft, or F5 to get its code, or type a number such as 13 to find the key it belongs to. The reference covers letters, digits, function keys, arrows, modifiers, and editing keys, and reports the modern event.code value alongside the legacy number. keyCode is deprecated: new code should use event.key, which gives the character produced, and event.code, which gives the physical key, because keyCode behaves inconsistently across layouts and browsers. This reference exists for reading older code, maintaining legacy handlers, and understanding examples that still use numeric codes. Lookups run entirely in your browser.
How to use Javascript Keycode Reference
- Paste your text type, paste (Ctrl+V) or drop a .txt file into the box above.
- Click Convert the tool runs entirely in your browser — nothing is uploaded.
- Read your results they appear below the tool as soon as the conversion finishes.
- Download the result save it for your records.
- Convert another clear the box and paste new text — no sign-up, no limits.
Format facts
| Input | Any plain text, or a .txt file (dropped or browsed). |
|---|---|
| Engine | Built-in browser engine |
| Category | Developer Tools |
Limits
- Browser processing has practical limits: files over 200 MB (or very long media) may be too large for your device. You will get an honest “too large” message, never a fake result.
- Pasted content is handled as plain text — formatting from documents is not preserved.
Frequently asked questions
Is keyCode still used?
Only in older code. It is deprecated in favour of event.key and event.code, which behave consistently across keyboard layouts.
What is the difference between key and code?
event.key is the character produced, such as a, while event.code is the physical key, such as KeyA, which stays the same on any layout.
Why do letters and digits have these numbers?
They come from ASCII: A is 65 and 0 is 48. Function keys and special keys use the ranges above 100 and below 50.
Can I look a code up in reverse?
Yes. Type a number such as 13 and the tool returns the key it belongs to, Enter in that example.
Was this tool helpful?
Thanks — your feedback helps us improve this tool.
Sorry it didn’t help — tell us what went wrong and we’ll fix it.