Swap Case Converter

Invert the case of every letter — uppercase becomes lowercase, lowercase becomes uppercase. Sometimes called inverse case or iNVERSE cASE.

Example: Hello WorldhELLO wORLD

Swap case (also called inverse case, opposite case, or iNVERSE cASE) flips every letter's case: uppercase letters become lowercase, lowercase letters become uppercase. Numbers and punctuation pass through unchanged.

It's mostly used for visual effects, ironic captions, or as a quick way to invert text that's been pasted in with the wrong shift-key state. Python ships with str.swapcase() as a built-in for exactly this transform.

When to use it

Fixing accidental Caps Lock typing

You typed a sentence with Caps Lock on by accident? Swap case is faster than retyping. tHIS WAS YOUR CAPS-LOCK PROBLEM → This was your caps-lock problem.

Inverse-case visual effects

Some social-media bios and meme templates use inverse case for stylistic emphasis or as a softer alternative to aLtErNaTiNg cAsE.

Programming exercises

Swap-case is a classic intro programming problem ("write a function that swaps the case of every character"). Useful for testing your implementation against a known-good output.

Generating test fixtures

For QA on case-insensitive search or comparison code, run sample text through swap-case to confirm the comparison still matches the original.

Trolling formal text

Inverting the case of formal text (legal contracts, terms of service) can produce comically casual versions for satire — though obviously not for real contractual use.

How the conversion works

The swap case converter scans every character in the input string and applies a simple inversion rule. For each character, if it belongs to the Unicode category 'Lu' (uppercase letter), it is transformed to its lowercase counterpart using Unicode's language-independent case mapping (full case folding is not applied). Conversely, if it belongs to 'Ll' (lowercase letter), it is converted to uppercase. Characters outside the letter categories — including numbers, punctuation, whitespace, and symbols — are left unchanged. This operation is idempotent: applying swap case twice restores the original text. The tool processes the text in a single pass, O(n), using the JavaScript String.prototype.toUpperCase() and toLowerCase() methods which respect the locale-neutral mapping defined in the Unicode Character Database.

How to use it

  1. Paste or type your text into the input box.
  2. Click the 'Swap Case' button (or toggle).
  3. The transformed text appears instantly in the output area.
  4. Copy the inverted text to your clipboard.

Edge cases this converter handles

Non-ASCII letters
Characters like 'É' or 'ä' are swapped correctly as long as they are defined as cased in Unicode.
Empty string
Returns an empty string with no error.
All numbers
All characters remain unchanged, output equals input.

Pro tips for case conversion

  • Use swap case to create stylized 'mockng' text for social media posts.
  • Combine with other case converters on this site for complex transformations.
  • Note that swap case is not suitable for data normalization because it does not preserve case meaning.
  • If you need to invert case only for specific characters, consider using find/replace with regex.

vs other ways to change case

Compared to built‑in programming functions or text editor shortcuts, this tool offers a quick, no‑install solution with live preview.

This toolPython str.swapcase()Notepad++ Toggle Case
Unicode supportFull Unicode (via JS engine)Full Unicode in Python 3Only ASCII (Notepad++ UCS-2 limited)
Instant previewYes, on every keystrokeRequires script executionNo preview, applies immediately
Batch processingNo, single text blockCan be scripted for filesCan process entire file via shortcut

A bit of history

The concept of swapping letter case is as old as the shift key on typewriters, but as a programmable function it first appeared in scripting languages like Python, where the str.swapcase() method was introduced in Python 1.5 (1998). The underlying operation relies on the Unicode Standard's algorithm for case conversion, which defines how each cased character maps to its opposite case. Today, swap case is a common utility in text editors, programming languages, and online converters, often used for playful or ironic typographic effects.

Common questions about case conversion

Is swap case the same as inverse case?

Yes. "Swap case", "inverse case", "opposite case", and "iNVERSE cASE" all refer to the same transform: every letter's case flipped.

Is swap case reversible?

Yes — running swap case twice on the same input returns the original. swap(swap(x)) = x. (This is true for letter case but not for whitespace or accent normalisation, which the tool doesn't touch.)

Does it affect non-Latin alphabets?

For scripts that have a case distinction (Cyrillic, Greek, Latin extended), yes. Scripts without case (Arabic, Hebrew, Chinese, Japanese, Thai) pass through unchanged because there's no case to invert.

Swap case vs alternating case — what's the difference?

Swap case inverts whatever case each letter currently is — so it depends on the input. aLtErNaTiNg cAsE imposes a fixed pattern (lowercase, uppercase, lowercase, uppercase…) regardless of the input's existing case.

Embed our tools on your website

Free for any site. No signup. Iframe loads from our servers and stays up-to-date automatically.

📋 Embed the Word Counter

Copy this snippet (auto-resizes, Copy button works):

Live preview:

📋 Embed this Swap Case Converter

Copy this snippet (auto-resizes, Copy button works):

Live preview:

Want more options? All embeddable tools →