Skip to content
T
Tools.Town
Free Online Tools for Everyone
hello-world

Text to Slug

100% Free

Convert any title to a URL-safe slug — handles diacritics (café → cafe), ligatures (ß → ss), &/+ expansion, configurable separator, smart truncation.

Real-time
Client-Side
Diacritic-aware
Separator
Max length (0 = no limit)
Slug 0 chars
your-slug-here

Embed This Tool

Easy to Embed

Add Text to Slug to your website or blog in seconds.

  • Responsive design
  • Lightweight & fast
  • No backend required
  • Always up-to-date
<iframe
  src="https://tools.town/embed/text-to-slug/"
  width="100%"
  height="600"
  style="border:none; border-radius:12px;"
  loading="lazy"
  title="Text to Slug">
</iframe>

Share This Tool

Share Instantly

Share Text to Slug with anyone — no login required.

  • Shareable link
  • No login required
  • Works on any device
  • No account needed

Share via

Advertisement

How to Use

  1. 1 Type or paste a title into the input
  2. 2 Pick a separator — `-` (default), `_`, or `.`
  3. 3 Set max length (0 = no limit) for SEO-friendly URLs
  4. 4 Slug appears instantly, ready to copy

Features

  • Lowercase + Unicode-NFD diacritic stripping (café → cafe)
  • Ligature expansion (ß → ss, æ → ae, œ → oe)
  • &/+ expanded to 'and' / 'plus'
  • Configurable separator (-, _, .)
  • Smart truncation at separator boundaries (no mid-word cuts)
  • Optional preserve-case mode

Why it Matters

URLs need to be readable, ASCII-safe, and stable over time. A reliable slugify keeps SEO-friendly permalinks consistent across blog posts, products, and content imports. Smart truncation that cuts at word boundaries avoids the awkward 'my-very-long-url-tit' truncation that loses meaning.

★★★★★

Use Cases

Blog Permalinks

Convert article titles to permanent URL slugs

Product URLs

Generate clean URL paths from product names

File Naming

Sanitise titles for safe filenames (lowercase, dash-separated)

Frequently Asked Questions

Why does 'café' become 'cafe' but '日本語' becomes empty?
We use Unicode NFD decomposition + ASCII filter. Latin diacritics (á, é, ñ) decompose into base + accent, then strip the accent. CJK characters don't have ASCII bases, so they're filtered out entirely. For Japanese/Chinese slugs use a transliteration library.
Why does the truncation sometimes go shorter than maxLength?
We try to cut at a separator boundary so words stay whole. If the last separator is within 60% of maxLength, we cut there instead of mid-word.
Is the slug guaranteed unique?
No — slugs are deterministic, so the same title always produces the same slug. For unique URLs append a random suffix or auto-incrementing number on the server side.

Related Tools You Might Like

Browse more free tools