Skip to content
Processing locally — files never leave your device

Slugify

Convert any string into a URL-safe slug. Strips diacritics, lowercases, and joins words with hyphens (or any separator you pick).

Bloggers — embed this widget for free

Add this tool to your own site with one line of HTML. Free forever — just keep the small credit link.

How to use Slugify

  1. Paste a title, headline, product name, or any string — one phrase per line if you have several.
  2. Keep the default hyphen separator for URLs, or change it (for example to an underscore) to match your framework or CMS.
  3. Leave Lowercase on for standard web URLs, or turn it off if your system needs mixed case.
  4. Read the generated slug in the output box — accents are stripped, punctuation is removed, and words are joined by your separator.
  5. Copy the slug and paste it into your URL, file name, or anchor ID. The conversion runs in the page itself, so titles for drafts you have not published yet stay private.

What a slug is and why it matters

A slug is the human-readable part of a URL that identifies a page — the best-coffee-grinders in example.com/blog/best-coffee-grinders. A good slug is lowercase, free of spaces and special characters, and made of real words separated by hyphens. This tool turns any title into exactly that, handling the fiddly details — accents, punctuation, and repeated separators — automatically.

How the conversion works

Slugification happens in a few deterministic steps. First the text is Unicode-normalised and its accent marks are stripped, so é becomes e. Next it is lowercased (unless you turn that off). Then every stretch of non-alphanumeric characters is replaced by your chosen separator. Finally, runs of repeated separators are collapsed and any leading or trailing separator is trimmed. The result is always clean, regardless of how messy the input was.

Why slugs help SEO

Search engines and humans both read URLs. A descriptive slug that contains your target keywords gives a clear signal about the page's topic and produces a tidy, clickable link in search results and when shared. Compare /p?id=8842 with /men-running-shoes — the second tells the reader what to expect before they click. Keeping slugs short and keyword-focused, and not changing them after publishing, are two of the simplest on-page SEO habits.

Choosing a separator

Hyphens are the standard for web URLs because search engines treat them as word boundaries. Underscores are common in file names and some programming contexts but are read as part of a single word by crawlers, so avoid them in public URLs. The tool lets you set any separator so the same slug can be adapted to URLs, file names, anchor IDs, or database keys.

Slugify a whole batch at once

Migrating a blog or seeding a CMS often means slugifying dozens of titles. Paste them one per line and you get a matching column of slugs you can copy straight into a spreadsheet or import file — far faster than converting each title by hand.

Related text tools

Frequently asked questions

Does it strip accents like à → a and ñ → n?
Yes. The tool applies Unicode NFKD normalisation and removes the combining marks, so "Crème Brûlée" becomes "creme-brulee". This keeps slugs in plain ASCII, which is the safest, most portable form for URLs and file systems.
Why hyphens instead of underscores?
Google has stated that it treats hyphens as word separators in URLs but underscores as joiners, so "blue-widget" reads as two words while "blue_widget" can read as one. For SEO-friendly URLs, hyphens are the recommended choice — but you can switch to any separator your platform requires.
Can I slugify multiple titles at once?
Yes. Put one phrase per line and each line is slugified independently, so you can convert a whole list of article titles or product names in a single pass and copy them all together.
What happens to punctuation and symbols?
Any run of characters that is not a letter or digit — spaces, commas, em dashes, ampersands, exclamation marks — is replaced by your separator. Repeated separators are then collapsed into one, and any separator at the very start or end is trimmed, so you never get a slug like "-best-dessert-".
Will it handle ampersands and the word "and"?
An ampersand is treated as punctuation and removed, so "Salt & Pepper" becomes "salt-pepper". If you specifically want "salt-and-pepper", replace the & with the word "and" in your title before slugifying — automatic transliteration of symbols to words is intentionally left out because it varies by language.
How long should a slug be?
There is no hard limit, but shorter is better for readability and sharing. A good practice is to slugify the core of your title and trim filler words like "a", "the", and "of" from the source text first, keeping the slug to a handful of meaningful words.
Can I use this for file names and IDs too?
Absolutely. Slugs make excellent file names, CSS class names, HTML anchor IDs, and database keys because they contain no spaces or special characters. Pick the separator that suits the target — hyphens for URLs and CSS, underscores for many file and identifier conventions.
Is my text uploaded anywhere?
No. The normalise-and-strip steps that build each slug are carried out by your browser, so the headlines of unpublished posts or internal pages are turned into URLs without ever being sent away.

More tools you might find useful in the same flow.

Built by Muhammad Tahir · About