Case Inverter

Flips the case of every letter in text, uppercase becomes lowercase and lowercase becomes uppercase, while numbers, spaces, and punctuation stay unchanged. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-22

Overview

Introduction

Flipping every letter's case, rather than forcing everything to one case, is a simple but occasionally useful transformation for text puzzles, testing, and stylistic effects.

It runs entirely client-side, so nothing you paste is ever uploaded to a server.

What Is Case Inverter?

A case inverter that checks each character: if it's already uppercase, it's lowercased, and if it's lowercase, it's uppercased.

Non-letters are left as-is.

How Case Inverter Works

Each character is compared against its own uppercase form; a match means it was already uppercase (so it gets lowercased), and a mismatch means it was lowercase (so it gets uppercased).

The transformation happens synchronously in JavaScript the moment you type, with no network round trip involved.

When To Use Case Inverter

Use it to quickly toggle the case of text you've already typed, or to generate a case-inverted variant for testing how code handles mixed case.

It's a fast way to get the answer without opening a code editor, a REPL, or writing a one-off script just to check.

Features

Advantages

  • Fully deterministic and reversible, running it twice returns the original text.
  • Leaves non-letter characters untouched.
  • Decides case by comparing each character to its own uppercase form, so it works for any script with cased letters rather than only for A-Z.

Limitations

  • Doesn't distinguish letters that look the same in both cases in some scripts.
  • Characters that are identical in both cases, as in scripts with no case distinction, are treated as uppercase and pass through unchanged.

Examples

Inverting mixed-case text

Input

Hello, World!

Output

hELLO, wORLD!

Every letter's case flips; the comma, space, and exclamation point are unchanged.

Best Practices & Notes

Best Practices

  • Running this tool twice on its own output returns the original text, useful for a quick round-trip sanity check.
  • Reach for it to rescue text typed with caps lock left on, which is the case it handles most cleanly.
  • Check the result whenever the text contains proper nouns or acronyms, since inverting turns 'NASA' into 'nasa' and 'Ada' into 'aDA'.

Developer Notes

The check `char === char.toUpperCase()` determines case rather than a fixed Unicode range test, which correctly handles accented and non-Latin letters that have defined upper/lower forms.

Case Inverter Use Cases

  • Toggling the case of previously typed text
  • Generating case-inverted test input for code review
  • Creating a stylized case-flipped text effect

Common Mistakes

  • Expecting numbers or symbols to change; only letters with case are affected.
  • Expecting conventional capitalization out of it; every letter is flipped rather than sentence or title casing being applied.

Tips

  • Run the tool twice on its output to confirm it returns exactly to your original text.
  • Because the operation is its own inverse, running it twice is a quick way to confirm nothing was altered by a copy-paste in between.

References

Frequently Asked Questions