String Utilities

Capitalize

Converts strings to title case by capitalizing the first letter of each word. Use via MCP in Cursor or Windsurf, or call GET /v1/string/capitalize with your text. Perfect for formatting headings, names, or titles — transforms "hello world example" into "Hello World Example". Handles Unicode characters and preserves spacing.

API Endpoint

GET /v1/string/capitalize

Code Examples

curl "https://tinyfn.io/v1/string/capitalize" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/string/capitalize', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/string/capitalize',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's string tools:

{
  "mcpServers": {
    "tinyfn-string": {
      "url": "https://tinyfn.io/mcp/string",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How does capitalize handle special characters and numbers?

It capitalizes letters only, leaving numbers, symbols, and punctuation unchanged. 'user-123 test_case' becomes 'User-123 Test_Case'.

What's the difference between capitalize and titlecase formatting?

This tool capitalizes every word, while traditional title case has rules for articles/prepositions. It's simpler but more predictable for programmatic use.

Can I use this in MCP agents for formatting user input?

Yes, it's perfect for AI agents processing form data, cleaning CSV headers, or formatting display names consistently across applications.

How does it handle multiple spaces or tabs between words?

Preserves all whitespace exactly as input — multiple spaces, tabs, and newlines remain unchanged while capitalizing adjacent words.

Does capitalize work with non-English Unicode characters?

Yes, it properly capitalizes accented letters and international characters. 'café münchen' becomes 'Café München'.

Try Capitalize Now

Get your free API key and start using Capitalize in seconds.

Get Free API Key