piapia123
en

Key Code Checker

Lookups

Everything runs locally in your browser — nothing is uploaded

Press a keyNo button to click — press and it appears

Click here, then press any key

Pressed keys light up on the board. ⚠️ Choosing the wrong layout does not affect the readings — keys are placed by **physical position**, so the lit shape tells you which keyboard you have: an extra key beside the left Shift means ISO, three Japanese keys by the space bar means JIS.

Combinations with Ctrl / Alt / Cmd are not intercepted, so your browser shortcuts still work (Ctrl+W will still close the tab).

Key details

No key pressed yet.

Key reference110 keys
ASCII table (0–127)The hex column is the escape form (0x41 = \x41)
ASCII table
DecHexCharName
00x00NULNULNull (terminates C strings)
10x01SOHSOH
20x02STXSTX
30x03ETXETX
40x04EOTEOT
50x05ENQENQ
60x06ACKACK
70x07BELBELBell (a terminal beeps)
80x08BSBS
90x09HTHTHorizontal tab (Tab key)
100x0ALFLFLine feed (the Unix line ending)
110x0BVTVT
120x0CFFFF
130x0DCRCRCarriage return (classic Mac line ending; Windows uses CRLF)
140x0ESOSO
150x0FSISI
160x10DLEDLE
170x11DC1DC1
180x12DC2DC2
190x13DC3DC3
200x14DC4DC4
210x15NAKNAK
220x16SYNSYN
230x17ETBETB
240x18CANCAN
250x19EMEM
260x1ASUBSUB
270x1BESCESCEscape (ANSI escape sequences start with it)
280x1CFSFS
290x1DGSGS
300x1ERSRS
310x1FUSUS
320x20 SPACE
330x21!EXCLAMATION MARK
340x22"QUOTATION MARK
350x23#NUMBER SIGN
360x24$DOLLAR SIGN
370x25%PERCENT SIGN
380x26&AMPERSAND
390x27'APOSTROPHE
400x28(LEFT PARENTHESIS
410x29)RIGHT PARENTHESIS
420x2A*ASTERISK
430x2B+PLUS SIGN
440x2C,COMMA
450x2D-HYPHEN-MINUS
460x2E.FULL STOP
470x2F/SOLIDUS
480x300DIGIT 0
490x311DIGIT 1
500x322DIGIT 2
510x333DIGIT 3
520x344DIGIT 4
530x355DIGIT 5
540x366DIGIT 6
550x377DIGIT 7
560x388DIGIT 8
570x399DIGIT 9
580x3A:COLON
590x3B;SEMICOLON
600x3C<LESS-THAN SIGN
610x3D=EQUALS SIGN
620x3E>GREATER-THAN SIGN
630x3F?QUESTION MARK
640x40@COMMERCIAL AT
650x41ALATIN CAPITAL LETTER A
660x42BLATIN CAPITAL LETTER B
670x43CLATIN CAPITAL LETTER C
680x44DLATIN CAPITAL LETTER D
690x45ELATIN CAPITAL LETTER E
700x46FLATIN CAPITAL LETTER F
710x47GLATIN CAPITAL LETTER G
720x48HLATIN CAPITAL LETTER H
730x49ILATIN CAPITAL LETTER I
740x4AJLATIN CAPITAL LETTER J
750x4BKLATIN CAPITAL LETTER K
760x4CLLATIN CAPITAL LETTER L
770x4DMLATIN CAPITAL LETTER M
780x4ENLATIN CAPITAL LETTER N
790x4FOLATIN CAPITAL LETTER O
800x50PLATIN CAPITAL LETTER P
810x51QLATIN CAPITAL LETTER Q
820x52RLATIN CAPITAL LETTER R
830x53SLATIN CAPITAL LETTER S
840x54TLATIN CAPITAL LETTER T
850x55ULATIN CAPITAL LETTER U
860x56VLATIN CAPITAL LETTER V
870x57WLATIN CAPITAL LETTER W
880x58XLATIN CAPITAL LETTER X
890x59YLATIN CAPITAL LETTER Y
900x5AZLATIN CAPITAL LETTER Z
910x5B[LEFT SQUARE BRACKET
920x5C\REVERSE SOLIDUS
930x5D]RIGHT SQUARE BRACKET
940x5E^CIRCUMFLEX ACCENT
950x5F_LOW LINE
960x60`GRAVE ACCENT
970x61aLATIN SMALL LETTER A
980x62bLATIN SMALL LETTER B
990x63cLATIN SMALL LETTER C
1000x64dLATIN SMALL LETTER D
1010x65eLATIN SMALL LETTER E
1020x66fLATIN SMALL LETTER F
1030x67gLATIN SMALL LETTER G
1040x68hLATIN SMALL LETTER H
1050x69iLATIN SMALL LETTER I
1060x6AjLATIN SMALL LETTER J
1070x6BkLATIN SMALL LETTER K
1080x6ClLATIN SMALL LETTER L
1090x6DmLATIN SMALL LETTER M
1100x6EnLATIN SMALL LETTER N
1110x6FoLATIN SMALL LETTER O
1120x70pLATIN SMALL LETTER P
1130x71qLATIN SMALL LETTER Q
1140x72rLATIN SMALL LETTER R
1150x73sLATIN SMALL LETTER S
1160x74tLATIN SMALL LETTER T
1170x75uLATIN SMALL LETTER U
1180x76vLATIN SMALL LETTER V
1190x77wLATIN SMALL LETTER W
1200x78xLATIN SMALL LETTER X
1210x79yLATIN SMALL LETTER Y
1220x7AzLATIN SMALL LETTER Z
1230x7B{LEFT CURLY BRACKET
1240x7C|VERTICAL LINE
1250x7D}RIGHT CURLY BRACKET
1260x7E~TILDE
1270x7FDELDELETEDelete (the keypad key, not Backspace)

One key press has three different answers, and they get mixed up constantly. `event.key` is the character produced, and it follows the keyboard layout and Shift — Shift+2 is `@` on a US keyboard and `"` on a German one. `event.code` is the physical position: `Digit2` is the second key on the number row no matter what it types there. `event.keyCode` is the number from the 1990s: deprecated, and ambiguous — it roughly follows the character (`A` and `a` are both 65) but follows position for punctuation (`;` and `:` are both 186). This tool lays all three side by side and labels what each one follows. Press a key and you get all four fields plus the ASCII value; below that is a reference of 100+ keys and the complete 0–127 ASCII table. Everything is computed in your browser — the keys you press never leave this device.

Features

  • Press any key to see key, code, keyCode, which and the ASCII value at once
  • Each field is labelled with what it follows — the character, the physical position, or a legacy value
  • Printable characters come with decimal and hex ASCII (`A` is 65 / 0x41)
  • Named keys come with their ASCII control code (Enter is 13 / CR, Delete is 127 / DEL) — the source of the keyCode-vs-ASCII confusion
  • Modifiers held down at the same time are listed (Ctrl + Shift)
  • Auto-repeat events are flagged, which is what you need to detect a key being held
  • IME composition is called out explicitly (during it `key` is `Process`, not a bug)
  • A reference of 100+ keys, searchable by name, code, keyCode or ASCII value
  • Left and right Shift / Ctrl / Alt are separate entries — only `code` can tell them apart
  • The full 0–127 ASCII table, with control characters shown as abbreviations instead of 33 blank cells
  • Combinations with Ctrl / Alt / Cmd are not intercepted, so your browser shortcuts keep working

How to use

  1. Click the detection box at the top of the page, then press any key
  2. The result list immediately shows that key’s key, code, keyCode, ASCII value and modifiers
  3. Press more keys to keep going — there is no button to click
  4. Search the reference below by name or value, or browse the full 0–127 ASCII table

FAQ

keyCode is deprecated, so why look it up?
Because it is the spec that was deprecated, not the fact that it appears in code. Existing projects, older libraries and a large amount of still-running sample code use `event.keyCode`, and reading them means knowing what those numbers mean. Writing new code needs the same reference in reverse — to confirm whether a given key should now be read from `key` or `code`. So it is listed alongside the other two, marked as deprecated, rather than hidden.
Why is Delete keyCode 46 but ASCII 127?
The two numbers answer different questions. `keyCode` says which key was pressed, and the Delete key carries the value 46. ASCII says which character was produced, and Delete is 127 (DEL). Enter is the same story with a twist: its `keyCode` of 13 happens to equal its ASCII control code 13 (CR), purely because that key has produced that byte since the teletype era. The tool shows the two columns separately so this stays visible instead of being conflated.
Should I use key or code in my own code?
It depends on whether you mean the character or the position. Keyboard shortcuts (Ctrl+S and friends) should use `code`, which tracks the physical key and keeps working when the user switches to a French or Russian layout. Anything about what the user actually typed should use `key`, which is what input handling, shortcut hints and games want. The historical failure mode is precisely why `keyCode` was deprecated: shortcuts written with it break on non-US keyboards.
Why does my Chinese or Japanese IME show Process?
Because at that moment the key press has not become a character yet. While the IME is composing, the browser reports `key` as `Process` and `keyCode` as 229 — and the tool additionally flags the composition. It is not a bug but a real signal: to know what the user actually entered you have to read after `compositionend`, since reading only `keydown` turns a whole sentence into a run of `Process` events.
Why does Ctrl+W not get intercepted on this page?
On purpose. The page only intercepts the default action of a few keys, and only while the detection box has focus and no modifier is held: Space and the arrow keys, so the page does not scroll away, and `/` for Firefox quick find. Anything with Ctrl, Alt or Cmd is let through, because those belong to the browser and the operating system — swallowing Ctrl+W (close tab), F5 (reload) or F12 (dev tools) would just make people think their browser is broken.

Related tools