Tool to decrypt messages according to Trevanion cipher/code, depending on the position of the letters and the punctuation.
Trevanion Cipher - dCode
Tag(s) : Steganography
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 Trevanion code is a method of steganography that involves concealing a message by using the position of punctuation marks within a text.
Each punctuation mark serves as a marker to extract a letter from the hidden message located at a position determined by a rule (defined between the communicating parties).
Trevanion's method of encryption/steganography involves writing a base text by precisely placing punctuation marks. After each mark (comma, period, semicolon, exclamation mark, question mark, etc.), a fixed number of letters are counted (for example, 3 letters). The letter in that position corresponds to a letter in the hidden message.
Example: In the sentence Wow! How did he do? Incredible! Did you see that? Exact position. the letters directly following each ponctuation sign are: H,I,D,E which is the hidden message.
Decryption requires knowing the shift N used during encoding.
To find the hidden message, scan the text and identify each punctuation mark defined as a trigger.
After each one, count N letters (according to the chosen rule) to extract one letter from the plaintext.
Example: This website, I admit, is cool! Prodigious tools, so dazzling things here. Great job!
With N=3, The original plain text is DCODE.
A message using the Trevanion code is difficult to recognize if the underlying text is natural and the punctuation appears consistent.
However, excessively frequent or artificial punctuation can raise suspicions. Therefore, the method is not inherently undetectable, but relies on the discretion and plausibility of the text.
Without knowing the parameters (value of N, trigger characters, counting method), decryption relies on assumptions and brute-force attacks.
dCode can automatically test the most common combinations, varying the shifts and counting methods, to identify plausible messages.
It is possible to set the trigger characters, eg. to use characters other than the classical punctuation.
The method for calculating the offset may be different for each person, some will count for all characters, others will treat only letters.
Example: `GO! ATTACK!' has for 3rd letter A, for 4th character _ including the spacing or ! if space is ignored.
17th century but the author is probably not John Trevanion. The name of this code was given in honor of John Trevanion, an Englishman, a prisoner who received a letter from a friend using this principle. But historians have found inconsistencies in this story and its authenticity is called into question.
dCode retains ownership of the "Trevanion Cipher" source code. Any algorithm for the "Trevanion Cipher" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Trevanion Cipher" 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 "Trevanion Cipher" 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 "Trevanion Cipher" 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: Trevanion Cipher on dCode.fr [online website], retrieved on 2025-12-21,