Need to format headlines, article titles, or product names correctly? The Title Case Converter API applies intelligent capitalization rules, handling articles, prepositions, and conjunctions according to standard style guides.
What is Title Case?
Title Case is a capitalization style where major words are capitalized while minor words (articles, short prepositions, conjunctions) are lowercase, unless they start or end the title. It is the standard format for headlines, book titles, and headings.
Examples:
The Quick Brown Fox Jumps over the Lazy DogHow to Build a REST API in Node.jsWar and Peace
Capitalization Rules
The API follows standard title case conventions:
Always Capitalize
- First and last word of the title
- Nouns, verbs, adjectives, adverbs
- Words with 4+ letters
Lowercase (unless first/last)
- Articles: a, an, the
- Short prepositions: in, on, at, to, by, for
- Conjunctions: and, but, or, nor
Special Handling
- Hyphenated words: Each part capitalized
- Acronyms: Preserved as uppercase
Using the Title Case Converter API
TinyFn provides a smart endpoint for title case conversion:
POST https://api.tinyfn.io/v1/transform/titlecase
Headers: X-API-Key: your-api-key
Content-Type: application/json
{
"text": "the quick brown fox jumps over the lazy dog"
}
{
"original": "the quick brown fox jumps over the lazy dog",
"titlecase": "The Quick Brown Fox Jumps over the Lazy Dog",
"style": "ap"
}
Parameters
| Parameter | Type | Description |
|---|---|---|
text |
string | The text to convert (required) |
style |
string | Style guide: ap, apa, chicago, mla, simple (default: ap) |
preserve_acronyms |
boolean | Keep acronyms uppercase (default: true) |
Code Examples
JavaScript / Node.js
const response = await fetch(
'https://api.tinyfn.io/v1/transform/titlecase',
{
method: 'POST',
headers: {
'X-API-Key': 'your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: 'how to build a REST API',
style: 'chicago'
})
}
);
const { titlecase } = await response.json();
console.log(titlecase); // How to Build a REST API
Python
import requests
response = requests.post(
'https://api.tinyfn.io/v1/transform/titlecase',
headers={'X-API-Key': 'your-api-key'},
json={'text': 'war and peace', 'style': 'ap'}
)
result = response.json()
print(result['titlecase']) # War and Peace
cURL
curl -X POST "https://api.tinyfn.io/v1/transform/titlecase" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"text": "the art of war"}'
Common Use Cases
- Blog Headlines: Format article titles consistently
- E-commerce: Standardize product names and categories
- Content Management: Auto-format user-submitted titles
- Email Subjects: Create professional email subject lines
- Navigation Menus: Format menu items and page titles
Best Practices
- Choose a style guide: Pick one style and use it consistently
- Handle edge cases: Review output for proper nouns and acronyms
- Consider audience: AP style for journalism, Chicago for books
- Preserve intentional styling: Some brand names have specific capitalization
- Test with real content: Verify results with your actual titles
Try the Title Case Converter API
Get your free API key and start formatting titles perfectly.
Get Free API Key