Tool to write text as a route. Route cipher is a transposition cipher method which consists in reading letters in a text according to a predefined route/path, as a serpentine road.
Route/Path Cipher - dCode
Tag(s) : Transposition Cipher
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!
Route cipher is a way of writing a message using a transposition cipher. The idea is not to write the letters from left to right and top to bottom, like normal writing, but rather to follow a predefined path, like a serpentine in a grid, or in a zig zag way.
Path-write encryption consists of writing the text in a grid/matrix and reading it using a road/path usually in switchbacks/coils/zigzags.
Example: The text DCODEROUTE, written horizontally on a 4x3 grid reads as a serpentine column DETERCOO..UD
D↓ | C↱ | O⮧ | D↑ |
E↓ | R↑ | O↓ | U↑ |
T↳ | E⮥ | .↳ | .⮥ |
If the message does not fill the grid, add a character like . to end the column/row.
Decryption requires knowing the path (or at least the size of the grid) in order to write the letters of the message.
Example: The encrypted text PIN-AFD-THER on a grid of height 3 is written as
P | I | N | - |
A | F | D | - |
T | H | E | R |
Column reading according to the path returns the original text.
Example: The grid path reading returns PATHFINDER
The message has a coincidence index similar to that of the plain language because it is a transposition.
The number of characters is a multiple of the width and height of the grid (and therefore can not be a prime number).
The best method is to try different sizes and try to see if the beginning of the message is readable. dCode allows testing multiple possibilities automatically in order to detect the most probable.
On a grid of a given size, it is possible to write the text in the path of at least 8 (classical) ways (there are 2 possible directions for each of the 4 corners). Then reading can be a path too.
It is possible to imagine any type of path for letters, such as a spiral script. Another variant is Caesar box cipher.
dCode retains ownership of the "Route/Path Cipher" source code. Any algorithm for the "Route/Path Cipher" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Route/Path 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 "Route/Path Cipher" 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 "Route/Path Cipher" 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: Route/Path Cipher on dCode.fr [online website], retrieved on 2025-04-16,