String Utilities

Kebab Case

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.

API Endpoint

GET /v1/string/kebab-case

Code Examples

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)

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 do I convert text to kebab-case using MCP?

Call the kebab-case tool with your text as input. It automatically handles spaces, underscores, camelCase, and punctuation to produce clean kebab-case output.

What characters does kebab-case conversion handle?

Converts spaces, underscores, camelCase transitions, and most punctuation to hyphens. Removes or converts special characters while preserving alphanumeric content in lowercase.

Can I use kebab-case for URL slugs and file names?

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.

Does kebab-case preserve numbers and handle mixed input?

Numbers are preserved in their original positions. Mixed input like 'myVar123 Test_Case' becomes 'my-var123-test-case' with consistent hyphen separation.

What's the difference between kebab-case and snake_case conversion?

Kebab-case uses hyphens (-) while snake_case uses underscores (_). Both convert to lowercase, but kebab-case is more common for URLs and CSS.

Try Kebab Case Now

Get your free API key and start using Kebab Case in seconds.

Get Free API Key