Slugify
Convert text into URL-friendly slugs with configurable separator and length.
POST
1 credit
/v1/slug
curl -X POST "https://devtools.toolkitapi.io/v1/slug" \
-H "Content-Type: application/json" \
-d '{"text": "Hello World! This is a Test"}'
import httpx
resp = httpx.post(
"https://devtools.toolkitapi.io/v1/slug",
json={"text": "Hello World! This is a Test"},
)
print(resp.json())
const resp = await fetch("https://devtools.toolkitapi.io/v1/slug", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({"text": "Hello World! This is a Test"}),
});
const data = await resp.json();
console.log(data);
# See curl example
Response
200 OK
{
"slug": "hello-world-this-is-a-test",
"original": "Hello World! This is a Test"
}
Try It Live
Live Demo
Response
Description
Convert text into URL-friendly slugs with configurable separator and length.
How to Use
1
1. Send a POST request with the `text` field containing the string to slugify.
2
2. Optionally set `separator` (default `-`) and `max_length` (default 200).
About This Tool
Slugify converts any text into a clean, URL-friendly slug. It transliterates Unicode to ASCII, lowercases everything, replaces non-alphanumeric characters with a separator, and trims to a maximum length.
Why Use This Tool
- URL generation — Create clean slugs for blog posts, products, or pages
- File naming — Convert titles to safe filesystem names
- SEO — Generate keyword-friendly URL paths
Frequently Asked Questions
Does it handle Unicode characters?
Yes. Unicode characters are transliterated to their closest ASCII equivalents (e.g., `café` becomes `cafe`, `über` becomes `uber`).
What characters are kept?
Only lowercase letters (a-z) and digits (0-9) are kept. Everything else is replaced by the separator.
Start using Slugify now
Get your free API key and make your first request in under a minute.