Skip to main content

Text to Slug

Turn a title into a clean, lowercase, hyphenated URL slug.

Built and tested by Muhammad Irfan Liaqat · Updated

Text to Slug: key facts

  • Turns a title into a lowercase URL slug with hyphens, underscores or dots as the separator
  • Removes accents (café becomes cafe) and drops every character that is not a–z or 0–9
  • Apostrophes are removed without a separator, so “don't” becomes “dont”
  • Letters outside the Latin alphabet, such as Arabic or Chinese, are removed

What makes a good URL slug

A slug is the readable part of a web address that names a page, such as how-to-compress-images in example.com/blog/how-to-compress-images. This tool turns any title into a slug: it lower-cases the text, removes accents (café becomes cafe), drops punctuation and symbols, and joins the words with hyphens, underscores or dots.

Google's URL guidelines recommend readable words rather than ID numbers, and hyphens rather than underscores to separate words, so keep the hyphen separator for web pages. Short slugs are easier to read and share; removing filler words such as “a”, “the” and “of” usually leaves three to six words. Once a page is published, avoid changing its slug, or redirect the old address to the new one so existing links keep working.

How to turn a title into a URL slug

  1. 1Type or paste a title or phrase into the box
  2. 2Choose a separator: a hyphen for web pages, or an underscore or dot if your system needs one
  3. 3Remove filler words from the title if the slug is long
  4. 4Click Copy to copy the slug

Frequently Asked Questions

What is a URL slug?
A slug is the part of a URL that identifies a specific page in readable words. In example.com/blog/my-first-post, the slug is my-first-post.
Should I use hyphens or underscores in URLs?
Use hyphens. Google's URL structure guidelines recommend hyphens to separate words, because search engines read a hyphen as a space, while some systems treat words joined by underscores as one word.
How long should a slug be?
There is no fixed limit, but three to six meaningful words is usually enough to describe the page. Long slugs get cut off when shared and are harder to read.
Do slugs affect search rankings?
Only slightly. Words in a URL are a very small ranking signal. Their main benefit is that people can see what a page is about before they click it.
Does it work with non-Latin scripts?
No. The tool keeps only the letters a to z, numbers and separators, so text in scripts such as Arabic, Urdu, Hindi or Chinese is removed. For those languages, transliterate the title into Latin letters first or write the slug by hand.
What characters are allowed in a URL slug?
Lowercase letters a–z, digits 0–9 and hyphens are the safest choice. Other characters, such as spaces, accents and symbols, have to be percent-encoded in a URL, which makes links long and hard to read. This tool outputs only letters, digits and the separator you choose.
Should I remove words like “the” and “and” from a slug?
It is optional. Removing them makes the slug shorter, for example how-to-bake-bread instead of how-to-bake-the-perfect-bread, but they do no harm. The tool keeps every word, so delete any you don't want.
Can I change a slug after a page is published?
Yes, but set up a 301 redirect from the old URL to the new one. Without it, existing links and bookmarks break and search engines treat the new URL as a new page.
How do I set a custom slug in WordPress?
Open the post, find the URL or Permalink field in the post settings sidebar, and paste the slug there. WordPress builds a slug from the title by default, but often keeps stop words and can be long.

Related Tools

Guides