FA Dev Tools

Cangjie Code 倉頡碼

Type or paste Chinese characters to get each one's Cangjie code (倉頡碼): the radicals on the keys and the keyboard letters to type. Runs in your browser.

Loading the Cangjie data…

Instructions

Looks up the Cangjie (倉頡) input code of each Chinese character you type or paste.

  1. Type or paste one or more Chinese characters into the box.
  2. Read each character's 倉頡碼 (the radicals, e.g. 弓田火) and 鍵盤字母 (the keys to press, e.g. NWF).
  3. Copy takes every row as tab-separated text, ready for a spreadsheet.

Tips

  • Spaces, punctuation, numbers and English are skipped, and a character that appears twice is listed once.
  • The codes are 3rd-generation Cangjie (倉頡三代) from the Unicode Unihan database, as used by the Windows and macOS input methods. Other dictionaries can differ for a few characters, e.g. 黃 is TMWC here; eduhk ↗ opens the character on the EdUHK dictionary for comparison, pronunciation and strokes.
  • Nothing is sent anywhere: the data loads once with the page and the lookup runs in your browser. The text is kept in this browser's localStorage.
  • Hit Example, then click Load example for 魚 on its own, or the text box for a sentence with punctuation and English mixed in.

About Cangjie codes 倉頡碼

What Cangjie is

Cangjie (倉頡輸入法) is a shape-based way to type Chinese on a standard keyboard. Instead of spelling a character's sound, you break it into parts and type one key per part. It needs no knowledge of pronunciation, so it works the same for Cantonese and Mandarin speakers, and it is the most widely taught input method in Hong Kong and Taiwan.

How a code is built

Each of the letters A to Y carries a radical (字根): A 日, B 月, C 金, D 木, E 水, F 火, G 土, H 竹, I 戈, J 十, K 大, L 中, M 一, N 弓, O 人, P 心, Q 手, R 口, S 尸, T 廿, U 山, V 女, W 田, X 難, Y 卜. Each key also stands for shapes that look like its radical, so 戈 (I) also covers a dot at the top of a character. Z (重) is not part of any code; input methods use it to pick between characters.

A character is split from top to bottom and left to right, and a code has at most five keys. Long characters keep only the first parts and the last one, so the code stays short. For example 魚 is the hook on top, then 田, then the four dots: the hook is 弓 (N), 田 is W and the dots are 火 (F), giving 弓田火, or NWF on the keyboard.

Versions and why dictionaries differ

Cangjie has been revised several times. The 3rd generation (倉頡三代) is what the Windows and macOS input methods use, and it is what this tool shows, from the Unicode Unihan database. The 5th generation and some school dictionaries code a few characters differently, so 黃 is TMWC here but TMLC elsewhere. If your input method rejects a code, try the other version or open the character on the EdUHK dictionary from the result row.

What this tool does

Type or paste any Chinese text and every distinct character is listed once, in order, with its radicals and keyboard letters. Spaces, punctuation, digits and English are skipped. The data covers about 29,000 characters, including the common Hong Kong characters, and the lookup runs entirely in your browser; your text is never uploaded. Copy gives you the table as tab-separated text.

Frequently asked questions

How do I find the Cangjie code of a character?
Paste the character into the box. The 倉頡碼 column shows the radicals, such as 弓田火, and the 鍵盤字母 column shows the keys to press, such as NWF.
What is 速成 (Quick) input?
速成 is a simplified Cangjie that types only the first and last key of the full code, so 魚 is NF. It is easier to learn but shows more candidates to pick from.
Why does my input method give a different code?
This tool uses 3rd-generation Cangjie, as the Windows and macOS input methods do. Some input methods and dictionaries use the 5th generation, which codes a few characters differently.