Columnar Transposition Cipher

Encrypt and decrypt text with the Columnar Transposition cipher online using a keyword that controls column order. A classic transposition cipher where characters are rearranged rather than replaced.

Input
0 chars · 0 bytes
Try:
Result
✓ Classical columnar transposition cipher ✓ Keyword controls column order ✓ We never store your messages ✓ Processed on our server
Examples
Encrypt with SECRET Key: SECRET
Input WEAREDISCOVERED
Output ACDESEEVROWIRDE

Keyword: SECRET. Columns are read in alphabetical key order while repeated letters keep their original order.

Decrypt with SECRET Key: SECRET
Input ACDESEEVROWIRDE
Output WEAREDISCOVERED

Keyword: SECRET. The same keyword restores the original row-wise message.

Encrypt a message with spaces Key: ZEBRA
Input ATTACK AT DAWN
Output C TAWT AATNAKD

Keyword: ZEBRA. Spaces are preserved and moved as part of the transposition pattern.

Encrypt punctuation and symbols Key: COLUMN
Input HELLO, WORLD!
Output H !LOOL,DEWLR

Keyword: COLUMN. Punctuation marks are not removed; they are rearranged with the rest of the text.

How the Columnar Transposition cipher works

The Columnar Transposition cipher writes the message into rows under a keyword. Each letter of the keyword labels one column. The columns are then read in alphabetical keyword order to produce the ciphertext.

Unlike substitution ciphers such as Caesar or Vigenere, this method does not replace letters with new symbols. It keeps the original characters but changes their positions, which makes it a transposition cipher.

When the keyword contains repeated letters, this tool keeps those columns in their original left-to-right order. This creates stable and predictable results for both encryption and decryption.

Column order example

The keyword controls the order in which columns are read. For example, with the keyword SECRET, the message is written row by row under the keyword:

SECRET
WEARED
ISCOVE
RED

The columns are read in alphabetical key order. Repeated letters keep their original left-to-right order, so SECRET gives this read order:

3:C → 2:E → 5:E → 4:R → 1:S → 6:T

Reading the columns in this order produces the ciphertext ACDESEEVROWIRDE.

Simple columnar transposition

This tool implements a simple single-key columnar transposition cipher. The text is written row by row, and columns are read according to the sorted keyword. The same keyword is required to decrypt the message.

This version does not add padding characters. If the final row is shorter than the keyword length, it remains incomplete. During decryption, the tool calculates the original column lengths from the ciphertext length and the keyword.

Columnar Transposition vs substitution ciphers

Substitution ciphers change the symbols in a message. For example, Caesar shifts letters and Vigenere applies keyword-based letter shifts. Columnar Transposition works differently: it preserves the original characters and only changes their order.

This makes it useful for understanding the difference between substitution and transposition, two major ideas in classical cryptography. However, by itself it is not secure by modern standards.

History and practical use

Columnar transposition methods were used in historical manual cryptography because they were simple to perform with paper and pencil while still producing text that looked scrambled.

More complex systems sometimes applied transposition more than once or combined it with other cipher methods. This page focuses on the simple single-key version, which is best suited for learning, puzzles, and demonstrations.

FAQ

No. It does not replace characters. It changes only their order, so it is a transposition cipher.

The key is a word or phrase whose sorted characters determine the order in which columns are read. The same key is required for decryption.

Repeated keyword letters are ordered from left to right. This keeps the column order stable and allows the same keyword to decrypt the message correctly.

No. This implementation does not add padding. Short final rows stay short, and decryption calculates the uneven column lengths automatically.

Spaces, punctuation marks, and numbers are preserved as characters and moved together with the rest of the message.

No. A simple columnar transposition cipher can be attacked with modern cryptanalysis and computers. It is mainly useful for education, puzzles, and historical demonstrations.

Double columnar transposition applies the columnar transposition process twice, often with two keys. This tool focuses on the simpler single-key version.
Related tools

Caesar Cipher

Classic letter-shift cipher with custom shift values.

Playfair Cipher

Classic digraph substitution cipher with keyword matrix encryption.

Vigenere Cipher

Keyword-based polyalphabetic encryption and decryption.

Vernam Cipher

XOR-based Vernam encryption with Base64 output.