URL/Slug Utilities

Slugify

Converts any text into clean, URL-safe slugs by removing special characters, replacing spaces with hyphens, and lowercasing everything. Use via MCP in Cursor or Windsurf for instant slug generation, or call GET /v1/slug/slugify with your text. Perfect for creating SEO-friendly URLs from article titles like "My Blog Post!" → "my-blog-post". Handles Unicode characters and multiple languages reliably.

API Endpoint

GET /v1/slug/slugify

Code Examples

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

response = requests.get('https://tinyfn.io/v1/slug/slugify',
    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 url/slug tools:

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

Learn more about MCP setup →

FAQ

How does slugify handle special characters and Unicode?

Slugify removes or converts special characters to hyphens, handles Unicode properly for international text, and strips accents from characters like é → e.

Can I use slugify in MCP-enabled editors for automatic URL generation?

Yes, slugify works in Cursor, Windsurf, and other MCP tools to instantly convert article titles, form inputs, or any text into URL-ready slugs during development.

What's the difference between slugify and just replacing spaces with hyphens?

Slugify does comprehensive sanitization: lowercases text, removes punctuation, handles consecutive spaces, trims edges, and ensures valid URL characters throughout.

Does slugify preserve word boundaries when converting text?

Yes, it maintains word separation by converting spaces and punctuation to single hyphens, so "Hello, World!" becomes "hello-world" not "helloworld".

How long can the input text be for slug generation?

The tool accepts reasonable text lengths for typical use cases like article titles, product names, and page headings without arbitrary limits.

Try Slugify Now

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

Get Free API Key