Tool for encoding and decoding text or binary data into Yi Jing hexagrams (䷀䷁䷂䷃䷄), a visual alternative to Base64
Hexagram Encoding - dCode
Tag(s) : Character Encoding, 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 64 hexagrams of the Yi Jing (or Classic of Changes) are a foundational work of Chinese philosophy.
Each hexagram is formed by six superimposed lines, representing either a broken line or a continuous line.
The Hexagram Code is a visual encoding system using these 64 symbols.
The Hexagram code is a hidden Base64 encoding where each Base64 symbol is replaced by its corresponding hexagram (decimal value from 0 to 63).
Hexagrams are encoded in the Unicode table U+4DC0 to U+4DFF (19904 to 19967 in decimal).
Example: dCode is encoded as ZENvZGU= in Base64, which is ䷙䷄䷍䷯䷙䷆䷔ in hexagrams.
The order of the hexagrams may vary (see below).
The King Wen order (or King Wen sequence) is a specific arrangement of the 64 hexagrams of the I Ching, traditionally attributed to King Wen (文王, Wén Wáng), a legendary ruler of the Zhou dynasty (11th century BCE).
This sequence is the most widespread and studied in the history of the I Ching, and it differs from other ancient arrangements, such as the Fuxi order (伏羲, Fú Xī), which follows a purely binary logic.
Hexagrams are characters composed of 6 superimposed lines (continuous or discontinuous).
dCode retains ownership of the "Hexagram Encoding" source code. Any algorithm for the "Hexagram Encoding" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Hexagram Encoding" 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 "Hexagram Encoding" or any other element are not public (except explicit open source licence). 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 "Hexagram Encoding" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
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: Hexagram Encoding on dCode.fr [online website], retrieved on 2025-12-05,