Want to create that iconic "mocking SpongeBob" text style? The Alternating Case Converter API transforms any text into aLtErNaTiNg CaSe format, perfect for memes, social media, and creative content.
What is Alternating Case?
Alternating case (also known as "spongebob case" or "mocking case") is a text style where letters alternate between uppercase and lowercase. It became popular through the "Mocking SpongeBob" meme and is used to convey sarcasm or mockery.
Example: "This is fine" becomes "tHiS iS fInE"
Alternating Case Variations
The API supports different alternating patterns:
Standard Alternating
Strictly alternates each character: hElLo WoRlD
Word-Based Alternating
Alternates the first letter of each word: Hello wORLD
Random Alternating
Random pattern that looks more natural: hELlO wOrLd
Using the Alternating Case API
TinyFn provides a simple endpoint for alternating case conversion:
POST https://api.tinyfn.io/v1/transform/alternating-case
Headers: X-API-Key: your-api-key
Content-Type: application/json
{
"text": "this is fine"
}
{
"original": "this is fine",
"alternating": "tHiS iS fInE",
"pattern": "standard"
}
Parameters
| Parameter | Type | Description |
|---|---|---|
text |
string | The text to convert (required) |
pattern |
string | Pattern type: standard, random, word (default: standard) |
start_lower |
boolean | Start with lowercase letter (default: true) |
Code Examples
JavaScript / Node.js
const response = await fetch(
'https://api.tinyfn.io/v1/transform/alternating-case',
{
method: 'POST',
headers: {
'X-API-Key': 'your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({ text: 'oh you like coding', pattern: 'random' })
}
);
const { alternating } = await response.json();
console.log(alternating); // oH yOu LiKe CoDiNg
Python
import requests
response = requests.post(
'https://api.tinyfn.io/v1/transform/alternating-case',
headers={'X-API-Key': 'your-api-key'},
json={'text': 'im not mad', 'pattern': 'standard'}
)
result = response.json()
print(result['alternating']) # iM nOt MaD
cURL
curl -X POST "https://api.tinyfn.io/v1/transform/alternating-case" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"text": "this is fine"}'
Common Use Cases
- Meme Generation: Create mocking SpongeBob style text
- Social Media: Add sarcastic tone to posts
- Chat Bots: Add personality and humor to bot responses
- Gaming: Create unique in-game names or messages
- Creative Writing: Emphasize tone in dialogue
Best Practices
- Use sparingly: Alternating case can be hard to read in large amounts
- Match the context: Best for casual, humorous content
- Try random pattern: Looks more natural and authentic
- Consider accessibility: Some users may have difficulty reading this style
- Test readability: Ensure the message is still clear