Skip to main content

Text to Slug

Convert a title or phrase into a URL slug: lowercase, hyphenated, and stripped of characters that do not belong in a web address.

Slugs are the readable part of a URL after the domain. Getting them right at the point of publishing matters, because changing one later breaks every existing link to the page.

This tool runs entirely in your browser

Everything happens in your browser as you type. The text is held in the page's memory, processed by JavaScript running on your device, and never sent to Filorra.

That matters for the things people actually paste into text tools: unpublished drafts, client work under NDA, cover letters, private notes. None of it is transmitted, logged, or stored.

How to use Text to Slug

  1. Enter your title

    Paste the headline or phrase you want to turn into a slug.

  2. Review the generated slug

    Spaces become hyphens, accents are simplified, and punctuation is removed.

  3. Shorten it if needed

    Trim filler words before using it — see the guidance below.

What makes a good slug

A slug should be short, readable, and stable. Those three properties do most of the work.

Short means three to five meaningful words. A slug generated verbatim from a long headline is unwieldy in a link, gets truncated in search results, and is awkward to read aloud. Cutting filler — "a", "the", "how to", "your" — usually leaves something better.

Readable means a person can guess what the page is about from the URL alone. That is the entire reason slugs exist rather than numeric IDs.

Stable means you should not change it. A slug is part of a permanent address: every link anyone has shared, every bookmark, and every search result points at it. Changing it breaks all of them unless you configure a redirect, and even then you lose some of the page's accumulated standing.

Why hyphens and not underscores

This is a settled question with a specific origin. Google treats hyphens as word separators and underscores as word joiners, so `text_to_slug` is read as a single token while `text-to-slug` is read as three words.

Hyphens are also easier to read in a rendered link, where an underscore can be obscured by the underline. Use hyphens; the convention is universal and there is no upside to deviating.

Accents, other alphabets, and what gets lost

Accented Latin characters are simplified to their base form — "café" becomes "cafe", "Müller" becomes "muller". This is deliberate: while modern browsers handle internationalised URLs, those addresses are percent-encoded when copied, so a clean-looking link turns into an unreadable string of escape sequences the moment someone pastes it into a message.

Non-Latin scripts have no base-letter equivalent to fall back on, so characters that cannot be simplified are dropped. A title written entirely in Chinese, Arabic, or Cyrillic will not produce a usable slug this way — for those, write a short transliterated or English slug by hand, which is what most multilingual sites do anyway.

When to use Text to Slug

  • Creating a URL for a new blog post or article.
  • Generating consistent slugs for imported content.
  • Producing clean file names from document titles.
  • Building category or tag URLs for a site.

Common problems

The slug is far too long.
Trim it to three to five meaningful words. Remove articles and filler — long slugs get truncated in search results and are awkward in links.
Non-Latin characters disappeared.
Characters with no Latin base form cannot be simplified, so they are dropped. Write a transliterated or English slug by hand for those titles.
Two pages produced the same slug.
Similar titles collapse to identical slugs. Add a distinguishing word rather than a number, which tells the reader nothing.
Should I update the slug on an old post?
Generally no. It breaks every existing link. If you must, set up a permanent redirect from the old URL to the new one.

Frequently asked questions

Is my text sent anywhere?
No. Slug generation runs entirely in your browser.
Why hyphens instead of underscores?
Search engines treat hyphens as word separators and underscores as joiners, so hyphens let the individual words be recognised. They are also more legible in a link.
How long should a slug be?
Three to five meaningful words. Long slugs are truncated in search results and awkward to share.
Can I change a slug after publishing?
You can, but it breaks every existing link and bookmark. If it is unavoidable, add a permanent redirect from the old URL.
What happens to accented characters?
They are simplified to their base Latin letter, so "café" becomes "cafe". This keeps the URL readable when it is copied and pasted.

Learn more

Guides and answers that explain how this tool's job actually works.

All Text Tools →