Tool to decrypt/encrypt with Chinese code (also called Samurai code) using lines/sticks to encode letters.
Chinese Code - dCode
Tag(s) : Symbol Substitution
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The Chinese code (or Samurai code) is a Scout code using intersecting vertical and horizontal lines to code letters according to the position of vowels and consonants in the alphabet.
Encryption with chinese code uses the positions (ranks) of vowels and consonants in the alphabet.
In the original chinese code cipher, the horizontal bars represent the vowels: A (1 bar), E (2 bars), I (3 bars), O (4 bars), U (5 bars), Y (6 bars) and vertical bars represent the number of consonants that follow the vowel in the alphabet.
Example: To code C, which is the 2nd consonant following the vowel A, use 1 horizontal bar (A is the first vowel) and 2 vertical bars.
To code L, which is the 3rd consonant following the vowel I, use 3 horizontal bars (I is the 3rd vowel) and 3 vertical bars.
Count the number of horizontal and vertical lines. The number of horizontal lines represent the vowels: A, E, I, O, U, Y then the number of vertical lines is used for the number of consonants following the vowel.
The Samurai variant swaps the vertical and horizontal lines.
The ciphered message is made of horizontal and vertical bars/lines/sticks. It is often used by scouts.
References to China, Samurai, Bushis, or Mandarins are clues.
The principle is very similar to unary marks.
It is possible to switch vertical and horizontal lines in order that the represent consonants and vowels or the opposite.
dCode retains ownership of the "Chinese Code" source code. Any algorithm for the "Chinese Code" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Chinese Code" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Chinese Code" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Chinese Code" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Chinese Code on dCode.fr [online website], retrieved on 2025-04-16,