Apply ROT13 to hide spoilers, or use ROT47 to scramble every printable character.
ROT13 rotates each letter 13 places. Because there are 26 letters, running the text through it again restores the original, so there is no separate decode step. ROT5 does the same for digits with a shift of five, and ROT18 combines ROT13 and ROT5.
ROT47 works on the whole range of printable ASCII characters from the exclamation mark to the tilde, which also scrambles punctuation and digits. All variants leave other characters, such as accented letters and spaces, unchanged.
No. It provides no real security because anyone can reverse it, and it is meant only to keep text from being read at a glance.
Shifting by 13 twice shifts by 26, a full trip around the alphabet.
When the text contains digits and punctuation that you also want scrambled. ROT47 covers 94 characters, so it applies a shift of 47, which is half of that range.