Tool to decode/encode with Ragbaby cipher, an encryption system proposing a progressive and different shift for each word.
Ragbaby Cipher - dCode
Tag(s) : Poly-Alphabetic Cipher
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
Ragbaby is a polyalphabetic substitution cipher using a progressive shift.
Encryption with Ragbaby uses the word division of a text as well as a disordered alphabet.
For each word, numbered i (ranging from 1 to N), each letter, numbered j (ranging from 0 to M) is shifted by i+j in the alphabet.
Example: Encrypt the 2 words RAG BABY with the alphabet ALPHBETCDFGIKMNOQRSUVWYZ, to obtain SPM THDH
Plain letter | R | A | G | B | A | B | Y | |
word i | 1 | 1 | 1 | 2 | 2 | 2 | 2 | |
letter j | 0 | 1 | 2 | 0 | 1 | 2 | 3 | |
i+j | 1 | 2 | 3 | 2 | 3 | 4 | 5 | |
Cipher letter | S | P | M | T | H | D | H |
It is important to define words and their divisions, such as whether a hyphenated word counts as 1 or 2 words.
The alphabet is generated from a keyword, whose repeated letters are removed before adding the rest of the letters of the alphabet in order.
Example: SECRET generates SECRTABDFGHIJKLMNOPQUVWXYZ
In the original version, the author describes an alphabet of only 24 letters, by removing the J (replaced by I) and the X (replaced by W).
Ragbaby necessarily has spaces (or other limiter) to separate the words.
In the original version, only 24 letters are used (no J or X).
The alphabet and its size are configurable.
The first word is shifted by 1, it is possible to take another value.
Each letter induces an additional shift of 1, it is possible to shift more.
Ragbaby was proposed by Sherlac, a member of the ACA (American Cryptogram Association) in 1955.
dCode retains ownership of the "Ragbaby Cipher" source code. Any algorithm for the "Ragbaby Cipher" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Ragbaby Cipher" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Ragbaby Cipher" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Ragbaby Cipher" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Ragbaby Cipher on dCode.fr [online website], retrieved on 2025-04-16,