Pig Latin is a playful language game that scrambles English words by a simple, deterministic rule. It is used by children to keep secrets, in word-game puzzles, and as a classic programming exercise. This tool applies the standard Pig Latin rules to whole sentences while preserving capitalisation and punctuation.
How it works
The transformation depends on the first sound of each word:
- Vowel start (a, e, i, o, u): append
wayto the end. apple becomes appleway. - Consonant start: move the entire leading consonant cluster to the end, then add
ay. pig becomes igpay; string becomes ingstray because the clusterstrmoves together.
The letter y counts as a consonant when it begins a word and as a vowel anywhere else, so it can terminate a consonant cluster. After rebuilding the word, the tool restores the original capitalisation pattern (first-letter or all-caps) and reattaches any leading or trailing punctuation.
Example
The phrase Hello world becomes Ellohay orldway: h is the leading consonant of hello, so it moves to the end with ay, and the capital H is reapplied to the new first letter. world moves the cluster w to give orldway.