ROT Util

This program hasn't been modified in years but is still downloaded regularly, so I have left it here for posterity.

The ROT Util is a simple program that enables you to encrypt or decrypt ROT text. It will convert to and from any level of rotation and also has a built in “AutoROT” feature, which attempts to automatically work out what ROT level encoded text was ciphered with (based on a wordlist).

I wrote it because at the time I hadn’t found any programs that had an automatic decoding option. Outlook Express has a built in “Decode from ROT13” function for email and newsgroups but you can’t encode at all, or decode any other ROT levels than 13.

What is ROT?

ROT (’rotate alphabet’) is another name for the Caesar Cipher, used by Julius Caesar to communicate with his army. Caesar is considered to have been one of the first people to use encryption to send messages. Ironically this method is still used by many to send messages across the Internet over a thousand years later.

The algorithm works by shifting each letter in the input message, thus it is a shift cipher.

A sample of ROTated text:

This is text rotated to 13 places
--> ROT13 -->
Guvf vf grkg ebgngrq gb 13 cynprf

Without some sort of utility to “decode” this text it would be impossible to read what it said. Also highlighted by the above example is the fact that only alpha characters are rotated. Numbers, punctuation and special characters aren’t rotated, and therefore can still be seen after your text has been encoded.

For more about this, check the Wikipedia page for the Caesar Cipher or Pookey's page.


The program comes with a feature to automatically decode rotated text. It does this by using a list of words, which can be edited by the end user. The text is rotated through 1 to 26 times and given a score based on how many matches there were with the wordlist. The text with the highest score is presented as the ‘best’ decoded option.

Whilst more advanced language analysis is possible the program manages to accurately identify most (English) encoded text when given a list of the 250 most common English words, which is available to download below.


Download ROT utility - simply unzip and run
Download the wordlist - contains the 250 most commonly used words in English (2 letter words removed)

2 comments on “ROT Util
  1. Mick says:

    I once wrote a rot26 program (on the grounds that it would be twice as secure as rot13).

    The main code loop ended up looking like this:

    while ((c = fgetc(infile)) != EOF)


    fputc ((c), outfile);



  2. dionicio says:

    show de bola eu já ussava a cifra de cesar 100 nenhum programe esse progama foi uma mão na roda!!

Leave a Reply

Your email address will not be published. Required fields are marked *