DevKits

Slugify — Convert Text to URL-Friendly Slugs Online

Convert any title or text to a URL-friendly slug (e.g. "Hello World!" → "hello-world"). Handles Unicode accents, ampersands, punctuation, and custom separators. Batch mode processes one line per slug. 100% local.

Last updated:

143 chars · 4 lines
Side-by-side preview
The Quick Brown Fox Jumps Over the Lazy Dog
the-quick-brown-fox-jumps-over-the-lazy-dog
Café — Delicious Pastries & Coffee
cafe-delicious-pastries-and-coffee
你好, World! 2026
world-2026
What's the difference between HTTP/2 and HTTP/3?
what-s-the-difference-between-http-2-and-http-3

Paste any title or text to instantly get URL-friendly slugs ("Hello World!" → "hello-world"). Handles Unicode accents (é → e), ampersands (& → and), punctuation, and lets you pick separator, max length, and strict-ASCII vs Unicode-preserving modes. Batch mode does one slug per line.

What is Slugify?

A slugify tool converts arbitrary human-readable text into a short, URL-safe identifier — the piece of a URL like /blog/hello-world at the end of a permalink. Getting slugification right is trickier than it looks: you need consistent handling of Unicode accents (should café become cafe or café?), ampersands (& → and, or drop?), consecutive punctuation, and length limits. This tool uses Unicode NFKD normalization to strip accents, converts ampersands to 'and' by default (a common SEO best practice), collapses runs of non-alphanumeric characters into a single separator, and truncates at word boundaries so the tail of a long title reads cleanly.

How to slugify text online

  1. 1Paste one or more titles into the input pane (one per line for batch mode).
  2. 2Pick a separator (hyphen is the SEO default), toggle case, and choose strict ASCII vs Unicode-preserving mode.
  3. 3The output pane shows the slugs; the side-by-side preview shows each original title next to its slug.
  4. 4Optionally set a max length — the truncation happens at a separator so no word is cut mid-way.

Use Cases

Blog / CMS URL generation

Generate consistent, SEO-friendly permalinks from post titles. Batch a whole content spreadsheet at once.

Filenames from titles

Slugify with underscore separator to get filenames like report_2026_q1.pdf from titles.

GitHub / Markdown anchor IDs

Preview the anchor GitHub will generate for a heading before you commit — pattern is very close to strict slugify with hyphens.

Database unique keys

Combine slug + numeric id (e.g. hello-world-42) for URL-friendly identifiers that are still guaranteed unique.

Tips & Best Practices

  • Google explicitly recommends hyphens over underscores in URLs. Use underscore only when you need filesystem compatibility with legacy tools.
  • For non-Latin sites, disable 'Strict (ASCII only)' so 你好-world stays 你好-world. Modern browsers and search engines handle Unicode URLs correctly.
  • The '& → and' rule works well in English. For other languages, disable it and let the character become a separator instead — 'Und' or 'et' is not universally right.
  • For stable long-term slugs, save a slug alongside the record and treat it as immutable — regenerating from a title later can break existing links.

Frequently Asked Questions

How does slugify handle non-ASCII characters?

Accented letters are transliterated to their ASCII equivalents (é → e, ñ → n, ü → u) via Unicode NFKD normalization. Non-Latin scripts (CJK, Arabic, Hebrew) are removed in strict mode; disable 'Strict (ASCII only)' to preserve them for non-Latin URLs.

Which separator should I use?

Hyphen (-) is the de-facto standard for SEO — Google explicitly recommends it over underscore. Use underscore (_) for filenames on legacy systems, or dot (.) when the slug is a subdomain component.

Are ampersands and special punctuation handled?

Yes. '&' is converted to 'and' by default (toggle-able), quotes and apostrophes become separators, and consecutive punctuation collapses to a single separator. Emojis and control characters are stripped.

Can I set a maximum length?

Yes — the tool truncates at a word boundary (the last separator before the limit) to avoid cutting a word mid-way. Set 0 to disable.

Is the input uploaded anywhere?

No. All processing runs entirely in your browser as client-side JavaScript.

Related Tools