Toggling case flips the capitalization of each letter independently: an
uppercase A becomes a lowercase a, and a lowercase z becomes an uppercase
Z. It is handy for fixing text typed with Caps Lock left on, or for quickly
creating a “reversed case” effect.
How it works
The tool walks through your text one character at a time. For each character it compares the character to its own uppercase and lowercase forms:
lower = char.toLowerCase()
upper = char.toUpperCase()
if lower === upper -> not a letter, keep as-is
else if char === lower -> output the uppercase form
else -> output the lowercase form
Because the decision is per-character, mixed-case input keeps its pattern but with every case inverted. Non-letters fall into the first branch and are copied straight through.
Example and notes
The input Hello World becomes hELLO wORLD. A string like iPhone 12 Pro
becomes Iphone 12 pRO. Numbers and the space stay exactly where they are. This
is a reversible operation: toggling twice returns the original text.