Write characters along a zigzag and read each rail in order.
Worked example
Setting: 3
WEAREDISCOVERED → WECRERDSOEEAIVD
Use the same settings when reversing the transformation. Coordinate-based methods may merge letters, discard punctuation or keep padding as described above.
Read the guide to choosing a method