Free slugify tool · JavaScript and web workflows

Slugify Online: Turn Text into a URL Slug

Slugify titles, identifiers and raw strings with the same rules you would ship in code — accents, stop words, separators and bulk mode included.

Live
Title or text
Separator engine
Rules
Generated slug
0 chars —
your-slug-here
0 words 0 chars 0 keywords 0 separators
Waiting for a title Length, symbols and hyphen health appear here.
Live full URL
https://example.com/your-slug-here
https:// /
Live SERP previewGoogle
YYour Sitehttps://yoursite.com › your-slug-here
Your Page Title Appears Here
A clean, readable URL like this one improves click-through rates.
Try a variation
Direct AI summary

ToolGuest URL Slug Generator is a free, zero-ad, 100% client-side SEO and developer tool that converts page titles and strings into clean, hyphenated URL slugs. It strips accents and stop words, previews the full URL and runs in under 50ms offline with zero server uploads.

Developer snippets

Copy the same slug rules into JavaScript or Python

Use the browser when you need one slug; use these snippets when the conversion belongs in a build script, a CMS hook or an API. Both follow the same order: normalise accents, lowercase, replace non-alphanumerics, filter stop words and trim at a word boundary.

JavaScript
function slugify(input) {
  return input
    .normalize('NFKD')
    .replace(/[\u0300-\u036f]/g, '')
    .toLowerCase()
    .replace(/[^a-z0-9]+/g, '-')
    .replace(/^-+|-+$/g, '')
    .replace(/-{2,}/g, '-');
}

slugify('Café Crème — URL Slugs');
// cafe-creme-url-slugs
Python
import re
import unicodedata

def slugify(value: str) -> str:
    value = unicodedata.normalize('NFKD', value)
    value = value.encode('ascii', 'ignore').decode('ascii')
    value = re.sub(r'[^a-zA-Z0-9]+', '-', value).strip('-').lower()
    return re.sub(r'-{2,}', '-', value)

print(slugify('Café Crème — URL Slugs'))
# cafe-creme-url-slugs

Built like a product, not a form

Every control you need to produce production-ready permalinks.

Multi-separator engine

Hyphens, underscores, slashes, dots or any custom delimiter.

Accent & script normalizer

é→e, ñ→n, ü→u. Cyrillic and Greek transliterated automatically.

SEO stop-word filter

Strip a, an, the, and, or — shorter, punchier URLs.

Live SERP preview

See exactly how your slug renders in Google results.

Bulk + CSV import

Paste a hundred headlines or drop a file — convert all in one shot.

Copy, export, history

Copy the slug or URL, export .txt / .csv, keep a private history.

GEO quick summary

What does slugify mean in JavaScript and web development?

Slugify Online is ToolGuest's free, client-side slugifier for developers. It turns text, titles and identifiers into lowercase hyphenated slugs, folds accents, removes stop words and supports bulk mode. Use it online in under 50ms or copy the matching JavaScript and Python snippets into your own codebase.

The word slugify describes a small, repeated transformation: take a human string, reduce it to the characters a URL can carry safely, and join the remaining words with a delimiter. A route, a filename, a CMS permalink and an API identifier all need the same treatment. This page gives you the browser version and the code version of that rule set.

It is deliberately narrower than a full text normaliser. Slugify does not translate, summarise or rewrite meaning. It removes what a URL cannot use, folds what a browser would otherwise percent-encode, and leaves the words a reader can recognise.

Reference table

Slugify reference: inputs and exact outputs

These are the transformations the engine applies, in order. The same examples are asserted by the build check, so the documentation cannot drift from the tool.

Slugify reference: inputs and exact outputs
Input stringSlugify outputRule applied
Hello Worldhello-worldLowercase and join words with a hyphen
Café Crèmecafe-cremeFold accented Latin letters to ASCII
  Multiple   spaces  multiple-spacesCollapse repeated whitespace and trim edges
100% Free Slugify!100-free-slugifyDrop punctuation, keep digits
Über Straßeuber-strasseü → u and ß → ss
Hello___Worldhello-worldCollapse repeated separators
Guide

What slugify means in a JavaScript codebase

In JavaScript, slugify usually appears in three places: a route generator, a file naming helper and a CMS preview field. The implementation is almost always the same chain of string operations. Normalise the Unicode, strip combining marks, lowercase, replace runs of non-alphanumeric characters with a hyphen, then trim the edges.

The output has to be predictable. A route generated on the server must match the canonical URL generated in the browser, or the same article will appear at two addresses. That is why this page shows the exact JavaScript and Python snippets next to the live tool instead of hiding them in a package.

Guide

The five slugify rules this tool applies

  • Normalise accents. NFD decomposition separates a letter from its combining mark; removing the mark leaves the base letter.
  • Lowercase. Case-sensitive servers treat /Page and /page as different resources.
  • Replace, do not delete, word breaks. Spaces and punctuation become the chosen separator, so words do not run together.
  • Collapse repeats. Double spaces, em dashes and mixed punctuation must not produce hello---world.
  • Trim the edges. A leading or trailing hyphen looks like a broken link even when it resolves.
Guide

When to slugify in the browser and when to use code

Use the browser when you are deciding what a page should be called. Editors and SEOs need to see the full URL, the length and the separator before they commit a title to a CMS. The live tool makes that decision visible in one screen, with no deployment and no dependency install.

Use the code snippet when the conversion is part of a build, an import or an API. Bulk migrations belong in a script that writes the same slug every time, not in a spreadsheet where one person uses underscores and another removes different stop words. The two paths should agree on the rules; that is the point of publishing both here.

Guide

Slugify without breaking existing routes

Changing a slugify rule changes every URL it touches. Before you roll a new regex across a live site, compare old and new outputs on a sample of real titles. Watch for dots, slashes and non-Latin scripts, which behave differently from a simple space replacement. If a rule change alters an existing route, publish a 301 redirect and keep the old path in your sitemap history long enough for crawlers to reprocess it.

For new pages, settle the pattern once: lowercase, hyphen-separated, no dates, no trailing punctuation. Then apply it at authoring time. A stable rule is worth more than a clever one that changes with each release.

FAQ

Slugify Online questions, answered

What does slugify mean?

Slugify means converting a string into a URL-safe slug: lowercase letters, numbers and a single separator instead of spaces, punctuation or accents. Developers use it for page routes, filenames, API identifiers and database keys, so the same text can travel through a URL without encoding.

How do I slugify text in JavaScript?

Normalise the string with normalize('NFKD'), remove combining marks, lowercase it, replace every run of non-alphanumeric characters with a hyphen and trim leading or trailing hyphens. The copy-ready JavaScript snippet on this page does exactly that, with no dependency or build step.

Does slugify convert accented characters?

Yes. The tool decomposes accented letters into a base letter plus a combining mark, removes the mark, then transliterates special characters such as ß to ss and ø to o. That produces ASCII slugs that survive older servers, CSV files, chat apps and cross-platform copy-paste.

Can I slugify multiple strings at once?

Yes. Switch to Bulk mode, paste one string per line and copy the generated list. Every line uses the same separator, stop-word and accent settings. Bulk mode is useful for route tables, product imports, sitemap migrations and content calendars with dozens or hundreds of titles.

Is this slugify tool different from an npm package?

The browser tool is for immediate, zero-install work and for checking output before you commit. An npm package such as slugify belongs inside a build pipeline. This page gives you matching JavaScript and Python snippets, so you can reproduce the same rules in code once the naming pattern is settled.

Slugify the next route before it ships

Paste a title, check the health badge and copy the slug or full URL. Then take the JavaScript snippet into your codebase if the pattern needs to be permanent.

Open the slug generator