Skip to content

Slug Generator

Turn a title or phrase into a clean URL slug as you type. Accented letters fold to ASCII through NFD normalisation, any non-alphanumeric run becomes a word boundary, and you can choose a hyphen or underscore separator, strip common English stop words, and cap the length on a whole-word boundary. The slug is never left empty for real input, and it is generated entirely on your device.

How Slug Generator works

  1. Type or paste the title you want to turn into a slug.

  2. Pick a hyphen or underscore separator.

  3. Strip stop words or set a maximum length if you need to.

  4. Copy the slug from the panel.

When to use Slug Generator

  • Turning a blog post or article title into the URL slug your content system expects, cleaned up as you type.
  • Producing a stable file or folder name from a heading that contains spaces, punctuation, or accented letters.
  • Generating an anchor or fragment identifier for an in-page link from a section heading.
  • Normalising a category or tag label into a consistent key — “Café & Bar” becoming “cafe-bar” — for a taxonomy.
  • Shortening a long title to fit a slug length budget without cutting a word in half.
  • Choosing underscores over hyphens for a slug destined for a system that treats hyphens specially.
  • Stripping filler words from a wordy headline so the slug leads with the terms that actually matter.

Examples

Accents fold and punctuation becomes a boundary

Input

10 Café Tips for Better Résumés!

Output

10-cafe-tips-for-better-resumes

The é and é fold to plain e via NFD decomposition, and the space and exclamation mark are treated as word boundaries.

Stripping English stop words

Input

The Art of the Deal, and Other Stories

Output

art-deal-other-stories

With stop words on, “the”, “of”, “and” drop out; the meaningful words remain in order.

Length cap trims on a word boundary

Input

A Complete Guide to Local-First Software (max length 20)

Output

a-complete-guide-to

Adding the next word would pass the 20-character budget, so it stops early rather than ending mid-word.

Underscore separator

Input

User Profile Settings, with the underscore separator

Output

user_profile_settings

The same word split joins with an underscore instead of a hyphen.

How Slug Generator works under the hood

The first step is accent folding. Your text is put through Unicode NFD normalisation, which decomposes an accented letter into its base letter followed by a separate combining mark — “é” becomes “e” plus a combining acute accent. The combining marks in the standard range are then stripped, leaving the plain ASCII letter behind. This is why “café” becomes “cafe” and “Résumé” becomes “resume” rather than being dropped or turned into a run of separators.

Once accents are folded, the text is split on any run of characters that are not ASCII letters or digits. Every space, punctuation mark, symbol, and emoji acts as a boundary, and consecutive separators collapse into one because the split is on a run rather than a single character. The pieces that survive are the words; empty pieces are discarded, so leading, trailing, and doubled separators never produce empty segments in the result.

Lowercasing is applied by default, matching the usual URL convention, and can be turned off if you need to preserve case. Stop-word removal, when enabled, drops a fixed list of common English function words — a, an, and, the, of, to, in, on, for, with, and around two dozen more — but only if doing so leaves something behind; if every word is a stop word, the filter is skipped so the slug is never emptied by it. The surviving words are then joined by your chosen separator, a hyphen or an underscore.

The optional length cap trims to whole words. The tool adds words one at a time, accounting for the separator between them, and stops before the budget is exceeded, so the slug never ends in the middle of a word. The one exception is a single leading word that is itself longer than the whole budget: rather than return nothing, it is hard-truncated to the limit, which preserves the guarantee that a non-empty input with a length cap still produces a usable slug. Empty input is the only case that yields an empty string.

Common mistakes

  • Assuming non-Latin scripts survive. Accent folding only recovers ASCII letters from decomposable Latin characters; scripts with no ASCII base — Cyrillic, Greek, Chinese, Arabic — have no letters or digits in the ASCII range, so they are treated as boundaries and dropped. For those titles you need a transliteration step before slugging.
  • Expecting stop-word removal to strip words from other languages. The stop-word list is English only, so “le”, “la”, “und”, or “de” pass through untouched. Turn the option off if a title is not in English and the filter is removing nothing useful.
  • Setting a length cap so low that only the first word fits. The trim keeps whole words, so a very tight budget can leave a single word — or, if that word alone is over budget, a hard-truncated fragment. Give the cap enough room for the words you want to keep.
  • Treating the slug as guaranteed unique. The generator produces a clean, readable slug from the text you give it, but it does not know about your existing URLs. If two titles reduce to the same slug, your system still needs to disambiguate them, for example by appending a number.

Frequently asked questions

All tools

Search NeatKit

Jump to a tool, a page, or change the theme.