A little help goes a long way. Find a tool/

Security

Columnar Transposition Cipher

Free columnar transposition cipher tool: encrypt or decrypt text with a keyword by rearranging columns of the classic irregular grid. Fully reversible, runs in your browser.

YOUR WORKSPACEFree to use. No sign-up.
—
Enter text and a keyword above.

Deep dive guides

A LITTLE CONTEXT · 3 MIN READTransposition vs Substitution Ciphers

How columnar transposition cipher works

Transposition ciphers change where characters sit, not what they are — every letter of the plaintext appears in the ciphertext, just somewhere else. In the classic columnar method the plaintext is written row by row into a grid as wide as the keyword, and the columns are then read out top to bottom in the alphabetical order of the keyword's letters: key ZEBRAS orders its columns A-B-E-R-S-Z, so the fifth column is read first and the first column last.

This implementation uses the irregular variant with no padding: a final partial row simply leaves the rightmost columns one character short, and short columns are read only as far as they go. That keeps the ciphertext exactly as long as the plaintext — no invented padding characters — and makes the operation reversible for any input length. Spaces and punctuation are transposed like any other character, which historically helped hide word boundaries.

Decryption reverses the process: knowing the keyword gives the same column order and each column's length, the ciphertext is sliced back into columns, the grid is rebuilt, and the plaintext is read row by row. The tool reports the column order it used (key ZEBRAS → order 4, 2, 1, 3, 5, 0) so you can verify the mechanics by hand, and everything runs locally in your browser.

Frequently asked questions

How does the keyword decide the column order?
The keyword's letters are sorted alphabetically and any letter encountered earlier in the key breaks ties (for BANANA, the three A's take columns 1, 3, 5 in that left-to-right order). The full read order for BANANA is therefore columns 1, 3, 5, 0, 2, 4 — the tool prints this order with every result so you can follow along.
Is transposition the same as substitution?
No, and the difference is visible in the output. Substitution ciphers like Caesar and Vigenère replace each letter with a different one, leaving character frequencies intact. Transposition keeps every letter exactly where its value is but moves its position, so letter frequencies match the original language perfectly while the ordering is scrambled — a cryptanalyst looks at frequency profiles to tell the two apart.
Why is there no padding or X filler?
Many textbook versions pad the last row with X or Z to make a complete rectangle. This tool uses the irregular variant instead: short final columns are simply read for as many characters as they hold. The ciphertext stays the same length as the input, nothing artificial is added, and decryption still works because the key determines exactly how long each column is.
Can spaces and punctuation be encrypted?
Yes — every character moves, including spaces and punctuation, and they are restored to their original positions on decryption. Classical practice sometimes removed spaces entirely to deny attackers word boundaries; if you want that behaviour, delete the spaces before encrypting and the ciphertext will read as one uninterrupted block.
Is this secure for real secrets?
No. Columnar transposition is a classical pencil-and-paper cipher, broken by anagramming and column-count attacks over a century ago. It is wonderful for learning how transposition works and for puzzles, but for actual secrecy use modern, well-vetted cryptography — treat this tool as history and education, not protection.