Columnar transposition rearranges a message by writing it in rows under a letter key, then reading down the columns in alphabetical key order. If the last row is short, this tool leaves it short. It does not add filler letters.

Set up the grid and key

  • The grid uses A–Z letters only. Check the prepared input to see any spaces or punctuation that were removed.
  • Use an A–Z key of up to 64 letters. Each key letter gives you one column.
  • Read columns in alphabetical key order. Repeated key letters keep their original left-to-right order.
  • Read down each column, skipping empty cells at the end.

A repeated-letter key

InputMEETATNOON
SettingsKey BALLOON; stable alphabetical order; no padding
Expected resultEOMOENTNAT
Try this method
Position1234567
KeyBALLOON
Row 1MEETATN
Row 2OON————
Read rank2134675

The columns are read in this order: 2, 1, 3, 4, 7, 5, 6. They contribute EO, MO, EN, T, N, A, T, giving EOMOENTNAT. Notice that the longer columns are the first three in the original grid, even after the key puts them in a different reading order.

Account for the short columns

Ten letters across seven columns make one full row with three letters left over. Original columns 1–3 therefore hold two letters each; the rest hold one. To decode, split the ciphertext using those lengths in key order, put the columns back, and read across the rows.

Try one yourself

Encode ABCDE using key CAB. Do not add a sixth letter.

Keep exploring

Repeated letters in columnar keysDecode a short final columnar rowScytale cipher tool