Skip to content
Test versionSearch

Developer tools

Unicode code-point rail-fence permutation

Unicode code-point rail-fence permutation. Apply the declared arithmetic transformation and inspect its exact text result.

How it worksFAQRelated tools

Content reviewed:

The example values can be changed. Press Calculate to update the result; you can download it as TXT or CSV and collect scenarios in this tab. Nothing is saved or sent automatically.

Top-start downward zigzag, read rail by rail. All Unicode code points/spaces participate; no padding. Combining sequences may separate, not a grapheme permutation. Educational/puzzle transformations, no protection for confidential data. Input 400 UTF16 units (Caesar all mode 200), result 500 characters each; no controls or unpaired surrogates. No Unicode transliteration. Press Calculate to update the result; you can download it as TXT or CSV. JSON and HTML downloads include your inputs and the numbers as calculated. Live calculation is off unless you switch it on. Nothing is saved or sent automatically.

Decimal results are approximate. Inputs stay in this browser tab.

How it works

Own declared arithmetic text shifts, substitutions and code-point permutations; educational only. Own structured JSON/result-row TXT/printable HTML files retain original inputs, options and result values. Top-start downward zigzag, read rail by rail. All Unicode code points/spaces participate; no padding. Combining sequences may separate, not a grapheme permutation. Educational/puzzle transformations, no protection for confidential data. Input 400 UTF16 units (Caesar all mode 200), result 500 characters each; no controls or unpaired surrogates. No Unicode transliteration. Press Calculate to update the result; you can download it as TXT or CSV. JSON and HTML downloads include your inputs and the numbers as calculated. Live calculation is off unless you switch it on. Nothing is saved or sent automatically.

Worked example

With these example values the calculator gives the result below. You can change any value in the form above.

Inputs

Direction
Encode
Rails: 2–20
3
Text or encoded input
WEAREDISCOVEREDFLEEATONCE

Result

Result text
WECRLTEERDSOEEFEAOCAIVDEN
Result code points
25

Frequently asked questions

How does the rail fence cipher work?

The text is written in a downward zigzag starting at the top rail and then read rail by rail. With 3 rails, WEAREDISCOVEREDFLEEATONCE becomes WECRLTEERDSOEEFEAOCAIVDEN in the rail-fence permutation tool.

How do I decode a rail fence cipher?

Choose the decode operation and enter the same number of rails used for encoding. The tool reverses the zigzag permutation of the code points.

Are spaces included in the rail fence permutation?

Yes. All Unicode code points, including spaces, take part in the permutation, and no padding is added.

Does the rail fence cipher keep accented letters together?

Not always. The permutation works on code points, not graphemes, so combining sequences may be separated.

How long can the rail fence input be?

Input can be up to 400 UTF-16 units and each result up to 500 characters. Control characters and unpaired surrogates are not accepted.

Is the rail fence cipher safe for secret messages?

No. The Unicode code-point rail-fence permutation is an educational or puzzle transformation and gives no protection for confidential data.