Skip to main content

Columnar Transposition Cipher Encoder and Decoder

Keyword sets the column order, the grid does the scrambling — encrypt, decrypt, regular or irregular padding, all in your browser

  • Runs locally
  • Category Encoding & Crypto
  • Best for Checking small payloads, tokens, hashes, and encoded values quickly.
Keyword columnar transposition cipher. The plaintext is written into a grid as wide as the keyword, the columns are numbered by the alphabetical order of the keyword letters, and the ciphertext is read column by column in that order. It is a transposition cipher — it reorders characters, it does not replace them, so spaces, punctuation and CJK are shuffled too. Decryption rebuilds the grid from the column heights and reads it back row by row.

On: short last row is filled with X so every column is the same height (regular). Off: the grid stays irregular and the round-trip is exact with no padding letters.

Input0 chars
Output0 chars
Encrypted / decrypted text appears here.

What this tool does

Encode and decode the keyword columnar transposition cipher, a staple of classic cryptography and CTF challenges. You type a keyword and a message; the tool writes the message into a grid as wide as the keyword, numbers the columns by the alphabetical order of the keyword letters, and reads the columns out in that order to build the ciphertext. To decrypt it rebuilds the grid from the column heights and reads it back row by row, so a correct keyword recovers the plaintext exactly. Switch between irregular padding (the last row stays short and the round-trip carries no filler) and regular padding (short rows are filled with X to a full rectangle, the form most textbooks and CTF graders expect). A live grid shows how the text falls into the columns and the read order of each one, and a one-click copy hands you the result. Everything runs as plain JavaScript in your browser, with a shareable link that reopens the same message and keyword.

Tool details

Input
Files + Text
The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
Output
Live result + Copy + Preview
The result area focuses on usable output, with copy, download, or preview actions when supported.
Privacy
Browser-side processing
The main tool logic does not call an external API, so inputs normally stay in the current tab.
Save / share
Shareable URL state
Key settings are encoded in the URL so another person can reopen the same setup.
Performance budget
Initial JS <= 9 KB
No WASM budget is declared, keeping the tool quick to open on mobile.
Best fit
Encoding & Crypto · Student
Category and role tags drive related tools, internal links, and quick fit checks.

How to use

  1. 1. Input

    Paste or drop your content into the tool panel.

  2. 2. Process

    Click the button. All processing is local in your browser.

  3. 3. Copy / Download

    Copy the result or download to disk in one click.

How Columnar Transposition Cipher fits into your work

Use it for quick browser-side encoding, decoding, hashing, token checks, and share-safe transformations.

Encoding jobs

  • Checking small payloads, tokens, hashes, and encoded values quickly.
  • Preparing values for APIs, URLs, docs, or support tickets.
  • Avoiding account-based tools when the input might be sensitive.

Encoding checks

  • Do not paste live secrets unless you are comfortable with local browser handling.
  • Confirm whether the operation is reversible before sharing the result.
  • For hashes, compare the exact algorithm and casing expected by the receiver.

Good next steps

These links move the current task into a more complete workflow.

  1. 1 Rail Fence Cipher Encoder & Decoder Encrypt, decrypt and brute-force a rail fence zigzag cipher, with a live grid, rail count plus offset, browser-only Open
  2. 2 Vigenère Cipher Encoder / Decoder Encrypt and decrypt with a keyword, polyalphabetic shift, case kept, non-letters passed through, browser-only Open
  3. 3 Caesar Cipher Encoder & Decoder Encrypt, decrypt and brute-force a Caesar shift cipher — all 25 shifts at once, ROT13 shortcut, browser-only Open

Real-world use cases

  • Solve a CTF transposition challenge

    A capture-the-flag puzzle hands you a block of jumbled uppercase letters and hints that the key is a single English word. Paste the ciphertext, switch to decrypt, and try keyword lengths against the block. When a guessed keyword like SECRET or ZEBRAS suddenly reads as plain text in the output, you have the key and the flag. The grid view shows exactly how the columns line up, which helps when you are anagramming the column order by hand.

  • Teach transposition in a cryptography class

    You want students to see that a cipher can hide a message by moving letters around rather than replacing them. Load the ZEBRAS example, show the grid filling row by row, then point at the column numbers to explain why the alphabet order of the keyword controls the read order. Toggle padding on and off so the class sees why a short last row makes decryption a little harder, and share the URL so everyone lands on the same worked example.

  • Build a layered classroom or hobby cipher

    Transposition pairs well with substitution. Run your message through a Caesar or Vigenere shift first, then feed that output into columnar transposition with a separate keyword, and you have a two stage cipher that resists casual frequency analysis far better than either step alone. The copy button makes chaining tools quick, and a friend with both keywords can reverse the stages in order to read it.

  • Check your homework or a textbook exercise

    Many introductory security and discrete math courses set columnar transposition by hand. After you encrypt a message on paper, paste the same plaintext and keyword here to confirm your column order and final string match. If the grader uses regular padding, flip the X padding toggle so your answer lines up with the expected fixed length form rather than the irregular one.

Common pitfalls

  • Forgetting which padding mode the puzzle uses. Irregular and regular forms produce different ciphertext lengths, so a CTF that expects a multiple of the keyword length will reject your irregular answer. Match the X padding toggle to the convention the grader assumes before you compare strings.

  • Reading the columns in keyword order instead of alphabetical order. The keyword letters are only labels. You sort them alphabetically and read the columns in that sorted sequence, so for ZEBRAS the A column comes first, not the Z column on the left.

  • Mishandling repeated keyword letters. When two columns share a letter the tie must break the same way every time, here left to right. If you order duplicate columns inconsistently between encrypt and decrypt, the message will not come back and the grid will look scrambled.

Privacy

Every step runs as plain JavaScript inside your browser tab. The grid, the column ordering, the encryption and the decryption all happen on your device, and no message, keyword or result is ever sent anywhere or logged. The one caveat is the shareable link, which encodes the text and keyword in the query string, so pasting a share link into chat records them in the recipient server access log. This is fine for a puzzle, but never run a secret you actually care about through any classic cipher, and do not share a link that carries one.

FAQ

Tool combos

Folks in your role tend to reach for these alongside this tool.

Made by Toolora · 100% client-side · Updated 2026-05-29