Encode ROT13

Rotate each ASCII Latin letter by 13 places; applying the same operation again restores the original.

freeworks offlinenothing uploaded
ToolROT13 Encoder
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

A–Z and a–z each form a 26-letter ring, and every matching letter advances 13 positions with case retained. Digits, punctuation, accented letters, and other scripts pass through unchanged.

  • No key or direction control exists because a shift of 13 is fixed and self-inverse.
  • The reported count includes only ASCII letters that actually moved.

Worked example

Encode Text
Apply the ROT13 substitution cipher to text
Input
											Hello, World!
										
Output
												Uryyb, Jbeyq!
											

When to use this

Usenet traditionally hid spoilers, programming exercises teach Caesar wraparound, and reversible fixtures verify that two passes restore ASCII prose.

Edge cases

  • Z wraps to M and z wraps to m rather than leaving the alphabetic range.
  • é, 9, punctuation, and non-Latin letters remain byte-for-byte unchanged in the JavaScript string.
  • The result provides no confidentiality because the substitution is fixed and public.

References