Inverts the case of every character in a string — uppercase becomes lowercase and vice versa. Access via MCP in Cursor or Windsurf for text processing tasks, or call GET /v1/case/swap directly. Perfect for creating alternating case patterns or preprocessing text data where case inversion is needed programmatically.
curl "https://tinyfn.io/v1/case/swap" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/case/swap', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/case/swap',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's case conversion tools:
{
"mcpServers": {
"tinyfn-case": {
"url": "https://tinyfn.io/mcp/case",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Each character is individually inverted: 'Hello World' becomes 'hELLO wORLD'. Uppercase letters become lowercase, lowercase become uppercase, and non-alphabetic characters remain unchanged.
Numbers, spaces, punctuation, and symbols are preserved exactly as-is. Only alphabetic characters (a-z, A-Z) have their case swapped.
Yes, it's available as an MCP tool in Cursor, Claude Code, and other editors. Useful for creating test data, formatting challenges, or preprocessing text before further transformations.
Yes, it handles Unicode properly. Characters like 'Ñ' become 'ñ', and accented characters maintain their accents while swapping case according to Unicode rules.
They're the same operation — both terms refer to inverting each character's case individually. Some systems use 'toggle' while others use 'swap' for this transformation.