JavaScript Char Codes (Key Codes) Finder
Easily find JavaScript character codes (key codes) for any keyboard key. Simply press a key inside the input box below and instantly see its corresponding Unicode, charCode, and keyCode values.
This tool helps developers understand how keyboard events work in JavaScript, especially when handling user input, shortcuts, form validation, or custom key controls.
| Key | Code | Key | Code |
|---|---|---|---|
| backspace | 8 | u | 85 |
| tab | 9 | v | 86 |
| enter | 13 | w | 87 |
| shift | 16 | x | 88 |
| ctrl | 17 | y | 89 |
| alt | 18 | z | 90 |
| pause/break | 19 | left window key | 91 |
| caps lock | 20 | right window key | 92 |
| escape | 27 | select key | 93 |
| page up | 33 | numpad 0 | 96 |
| page down | 34 | numpad 1 | 97 |
| end | 35 | numpad 2 | 98 |
| home | 36 | numpad 3 | 99 |
| left arrow | 37 | numpad 4 | 100 |
| up arrow | 38 | numpad 5 | 101 |
| right arrow | 39 | numpad 6 | 102 |
| down arrow | 40 | numpad 7 | 103 |
| insert | 45 | numpad 8 | 104 |
| delete | 46 | numpad 9 | 105 |
| 0 | 48 | multiply | 106 |
| 1 | 49 | add | 107 |
| 2 | 50 | subtract | 109 |
| 3 | 51 | decimal point | 110 |
| 4 | 52 | divide | 111 |
| 5 | 53 | f1 | 112 |
| 6 | 54 | f2 | 113 |
| 7 | 55 | f3 | 114 |
| 8 | 56 | f4 | 115 |
| 9 | 57 | f5 | 116 |
| a | 65 | f6 | 117 |
| b | 66 | f7 | 118 |
| c | 67 | f8 | 119 |
| d | 68 | f9 | 120 |
| e | 69 | f10 | 121 |
| f | 70 | f11 | 122 |
| g | 71 | f12 | 123 |
| h | 72 | num lock | 144 |
| i | 73 | scroll lock | 145 |
| j | 74 | semi-colon | 186 |
| k | 75 | equal sign | 187 |
| l | 76 | comma | 188 |
| m | 77 | dash | 189 |
| n | 78 | period | 190 |
| o | 79 | forward slash | 191 |
| p | 80 | grave accent | 192 |
| q | 81 | open bracket | 219 |
| r | 82 | back slash | 220 |
| s | 83 | close braket | 221 |
| t | 84 | single quote | 222 |
What Are JavaScript Char Codes?
In JavaScript, a character code represents the numeric Unicode value of a key pressed on the keyboard. For example, the Unicode value 97 represents the lowercase letter “a”.
The charCode property returns the Unicode character code of the key that triggered the keypress event, while keyCode is commonly used with keydown and keyup events.
Cross-Browser Key Code Detection
To ensure compatibility across different browsers, JavaScript developers often use the following fallback approach to detect key values:
This method works reliably in modern and older browsers when capturing keyboard input.
Why Use This JavaScript Key Code Tool?
- Instantly check JavaScript key codes and Unicode values
- Useful for keyboard event handling
- Helps debug keypress, keydown, and keyup events
- Ideal for JavaScript beginners and advanced developers
- No installation or setup required
Joydeep Deb
Senior Digital Marketer & Project Manager
Joydeep Deb is a results-driven Senior Digital Marketer and Project Manager with deep expertise in Lead Generation and Online Brand Management. An IIM Calcutta Alumni with an MBA in Marketing, he specializes in SEO, SEM (PPC), and Web Technologies.
Based in Bangalore, Karnataka - India.