Skip to main content

Slugify

Convert any text into a clean, URL-safe slug for blog posts and links.

Feedback

Key Features

  • Lowercases and strips accents (héllo → hello)
  • Replaces spaces and underscores with hyphens
  • Removes special characters and emoji
  • Collapses repeated hyphens and trims edges

Benefits

  • Generate SEO-friendly URLs in seconds
  • Keep blog post permalinks consistent across your site
  • Avoid broken links caused by unsafe URL characters
  • Works for file names, anchor IDs, and identifiers too

How to use this tool

Paste or type a title, headline, or phrase

Click Process to generate the slug

Copy the slug into your CMS or URL field

Turning a title into a URL slug without breaking it later

A slug is the human-readable part of a URL, and its job is to survive being typed, copied, shared, and read aloud. That means lowercase letters, digits and hyphens, and nothing else: spaces become percent-encoded and ugly, uppercase creates the question of whether the URL is case-sensitive, and punctuation ranges from merely unsightly to genuinely breaking.

Accented characters are the decision that matters most and the one most often made by accident. Transliterating café to cafe is the safe choice and is what most publishing systems do. Keeping the accent produces a URL that is valid, displays correctly in a modern browser, and turns into percent-encoded noise the moment somebody pastes it into a plain-text email or an older system. If your audience shares links outside the browser, transliterate.

Non-Latin scripts raise the same question with higher stakes. A Japanese or Arabic title can become a percent-encoded slug that is unreadable everywhere, a romanised approximation that loses meaning, or an English translation that is honest but no longer matches the title. There is no correct answer, only a house style, and the important thing is applying it consistently rather than per article.

Length is worth a limit. There is no technical maximum that matters in practice, and a slug carrying every word of a long headline is hard to read, wraps badly in messages, and gets truncated in link previews. Somewhere around a handful of meaningful words is enough, and dropping articles and prepositions usually loses nothing.

The rule that matters more than any of the above: once a slug is published, it is an address. Changing it breaks every existing link, every bookmark, and every citation, and hands you a 404 unless you set up a redirect at the same moment. Decide the slug before publishing rather than tidying it afterwards, and if you must change one, ship the redirect in the same change.

Duplicate slugs need a deliberate strategy, usually a numeric suffix, because two articles with the same title will otherwise collide silently and one will overwrite the other's address.

Frequently Asked Questions

Does it handle non-English characters?

Yes: accented characters are normalised to their ASCII equivalents (café → cafe). Characters with no ASCII equivalent are removed.

Related tools

Need this in a script?

The same tool answers on HTTP. Free, 1,000 calls a day, no card, and one token works across every Astral API.

POST https://astraltext.com/api/v1/slugify

Slugify APIGet a free token