Converts any text to kebab-case format with lowercase letters and hyphens separating words. Access via MCP in Cursor or Windsurf, or call GET /v1/string/kebab-case directly. Perfect for URL slugs, CSS class names, and file naming. Handles spaces, underscores, camelCase, and mixed punctuation reliably.
curl "https://tinyfn.io/v1/string/kebab-case" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/string/kebab-case', {
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/kebab-case',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
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"
}
}
}
}
Call the kebab-case tool with your text as input. It automatically handles spaces, underscores, camelCase, and punctuation to produce clean kebab-case output.
Converts spaces, underscores, camelCase transitions, and most punctuation to hyphens. Removes or converts special characters while preserving alphanumeric content in lowercase.
Yes, kebab-case output is URL-safe and file-system friendly. It's ideal for creating clean slugs, CSS class names, and standardized file naming conventions.
Numbers are preserved in their original positions. Mixed input like 'myVar123 Test_Case' becomes 'my-var123-test-case' with consistent hyphen separation.
Kebab-case uses hyphens (-) while snake_case uses underscores (_). Both convert to lowercase, but kebab-case is more common for URLs and CSS.