Search for a tool
Transposition Cipher

Tool to decrypt/encrypt with a transposition. A transposition cipher, also called columns permutation, is a technique to change the order of the letters in a text by placing it in a grid.

Results

Transposition Cipher -

Tag(s) : Transposition Cipher

Share
Share
dCode and more

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!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Transposition Cipher' tool for free! Thank you!

Transposition Cipher

Transposition Decoder

A transposition cipher refers to any encryption method that rearranges the letters of a message without changing their actual values. The most common type is columnar transposition (described below), but many other variants exist:

 




Decryption method


Loading...
(if this message do not disappear, try to refresh this page)
 

Grid Writing/Reading Encryption Directions


Transposition Encoder

 




Loading...
(if this message do not disappear, try to refresh this page)


Answers to Questions (FAQ)

What Is a Transposition Cipher? (Definition)

A transposition cipher is an encryption method that rearranges the characters of a message into a different order/arrangement according to a transposition key/permutation key.

Transposition cipher is the generic term for any encryption method that rearranges the letters of the plaintext into a new order. In the literature, the term is also associated with a particular family of methods, notably columnar transposition (or rectangular transposition), which consists of writing the plaintext in a table/grid/rectangle and then reading its columns according to a permutation defined by the key.

What Is a Transposition Key?

A transposition/permutation key is a sequence of numbers (often generated from a word) that indicates the order in which to read or rearrange the columns of the table.

Example: The word KEY generates the permutation 2,1,3 when its letters are sorted alphabetically:

Before alphabetical sortingAfter alphabetical sorting
KeywordK,E,YE,K,Y
Column order1,2,32,1,3

If the keyword contains repeated letters, a tie-breaking rule must be defined, for example by preserving the original order of identical letters.

How to Encrypt Using a Transposition Cipher?

The columnar transposition cipher consists of writing a message in a table of width N (where N is the length of the permutation), row by row (or, depending on the variant, column by column), and then rearranging/reading the columns according to the order defined by the key. The ciphertext is obtained by reading the table in the order specified by the method (by columns or by rows).

Example: Encrypting MESSAGE using columnar transposition with the key CODE (permutation 1,3,4,2) produces MASESEG when the message is written row by row and the columns are read in the order defined by the key:

Columns1,2,3,4Columns read1,3,4,2
PlaintextM,E,S,SCiphertextM,S,S,E
A,G,E,_A,E,_,G

The result depends on the convention used to fill and read the table. Some variants read the columns in a different order or read the table row by row after rearranging the columns.

If the grid contains empty cells, they can be filled with a padding/filler character, such as X, according to a convention known to the recipient. However, this changes the ciphertext and requires the decryption method to account for the padding rule.

How to Decrypt a Transposition Cipher?

Decrypting a columnar transposition cipher involves reconstructing the original table from the ciphertext by reversing the permutation used during encryption. The procedure depends on the order in which the table was filled and read.

If the message length (number of characters) is not a multiple of the grid width, the columns containing empty cells must be determined. This can be done by simulating the table-filling procedure used during encryption.

Example: With the permutation 2,1,3, the plaintext DCODEX can be encrypted as CDOEDX if the table is filled row by row and then read row by row after rearranging the columns:

Original columns1,2,3Columns read2,1,3
PlaintextD,C,OText after rearrangementC,D,O
D,E,XE,D,X

Example: The ciphertext is CDOEDX and the plaintext is DCODEX.

If the ciphertext was obtained by reading the columns, the table must be reconstructed according to the reading order and the length of each column.

Example: With the same permutation 2,1,3, reading the columns in the order 2,1,3 produces the ciphertext CEDDOX from the plaintext DCODEX:

Original columns1,2,3Reading order2,1,3
PlaintextD,C,OColumns readC,E,D
D,E,XD,O,X

Example: The ciphertext is CEDDOX and the plaintext is DCODEX.

How to Recognize a Transposition Cipher?

The ciphertext contains the same characters as the original message, but in a different order (rearrangement of characters).

The letter index of coincidence remains the same as that of the plaintext because the frequency of each letter is preserved.

In contrast, bigram frequencies (frequencies of consecutive letter pairs) generally change.

How to Decrypt a Transposition Cipher Without the Key?

It is possible to test every permutation if the key is not too long. However, the number of possible permutations increases rapidly with the key length: for N distinct columns, there are N! possible permutations.

Another approach is to know or guess a likely word in the plaintext and then search for a permutation that produces that word.

If the ciphertext is very short or contains only one or a few words, an anagram solver may sometimes help recover the plaintext, but its effectiveness depends on the message and language.

What Are the Variants of the Transposition Cipher?

The transposition cipher is, along with the substitution cipher, one of the fundamental techniques used in more elaborate encryption methods. Many ciphers use transposition, including ADFGVX, Amsco, double transposition/Double Transposition, and Redefence.

Why Fill the Empty Cells of a Transposition Table?

Empty cells in the grid can make decryption more difficult and time-consuming. The recipient must determine their positions by taking into account the number of characters in the message and the filling method used. If empty cells are not explicitly represented and no preliminary calculation is performed, errors may occur when reconstructing the table, particularly for the final letters.

Filling empty cells with a padding/filler character agreed upon in advance can make manual decryption easier. However, the convention used must be known, and it must be determined whether padding characters should be removed after decryption.

Source code

dCode retains ownership of the "Transposition Cipher" source code. Any algorithm for the "Transposition Cipher" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Transposition 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 "Transposition 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.

Cite dCode

The content of the page "Transposition 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: https://www.dcode.fr/transposition-cipher

In a scientific article or book, the recommended bibliographic citation is: Transposition Cipher on dCode.fr [online website], retrieved on 2026-11-28, https://www.dcode.fr/transposition-cipher

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Transposition Cipher' tool for free! Thank you!


https://www.dcode.fr/transposition-cipher
© 2026 dCode — The ultimate collection of tools for games, math, and puzzles.
▲  
Feedback