Substitution Language Guide: How a Rule Table Rewrites Text
Every rule of this tool is set in code, and the examples below were run again through the same engine.
What a substitution language is
A rule table is an agreement to replace set pieces of text with others. One table rewrites a whole text, which is why it shows up in conlangs, ciphers, and speech games.
For example, one rule that turns 'ing' into 'in-ing' makes 'running' into 'runnin-ing'.
When you build a table for the first time, write two or three rules and try them on a short text. If you do not like the result, fix just that one rule and the others stay as they are. You can also start from an example table and edit it.
The order rules are applied
The text is scanned once from left to right. At each spot the matching rule is applied, the replaced text is skipped, and the scan moves on.
If more than one rule matches at a spot, the rule with the longest find text wins. On a tie the one written first wins. With 'ab' to X and 'a' to Y, the text 'aab' becomes YX: the first a turns into Y and the ab after it turns into X.
Rules that change several characters at once often overlap with shorter ones. If the result surprises you, first check for overlapping rules and whether a longer rule is winning. If you write the same find text twice, only the first row is used and the rest is reported under the table.
Rules that swap each other
A rule that turns a into b and another that turns b into a look like they would chase each other forever, but a single scan ends at once. 'abba' becomes 'baab'.
Because replaced text is never fed back in, no table can loop forever, and the result is always one fixed answer.
Korean works the same way. Swapping the syllables 가 and 나 turns 가나다 into 나가다.
Reversing, and where it fails
Reversing flips every rule and scans once in the same way. Whether converting and then reversing returns the original is not promised in words. The tool actually reverses the result and compares.
Sometimes the original does not come back. If both a and b turn into x, then 'ab' becomes 'xx'. Reversing can use only one rule for x, the one written first, so it gives 'aa'.
A rule that deletes text by leaving the replacement empty cannot be reversed either. Such rows are listed under the table.
What it is good for
It suits alien speech in fanfic or a novel, cipher notes handed to players in a TRPG session, a way of talking among friends, and first practice at building a conlang.
In a TRPG you can hand players a cipher table by link and let them pick the reverse direction to read the original. If two rules turn into the same text, reversing goes wrong, so a cipher table is safer when every replacement is different.
A letter swap is easy to break, so do not use it to protect passwords or personal information.
Go to the tool