Skip to content
toolwise

Text to Slug

Turn titles into clean, URL-friendly slugs.

When to use it

Use this tool to turn a title into a clean, URL-friendly slug for a blog post, product page, file name or anchor link. It removes accents, punctuation and spaces, and can drop small words to keep addresses short. It is handy for bloggers, shop owners, developers and anyone naming files consistently.

How to use it

  1. Type or paste titles into Your text, one per line, or click Example.
  2. Choose the Separator: Hyphen ( - ) or Underscore ( _ ).
  3. Set a Maximum length if your system has one, or leave it empty.
  4. Keep Lowercase ticked for web addresses.
  5. Tick Remove short words (a, the, of…) for shorter slugs.
  6. Copy the Slug with Copy result, or download it as a .txt file.

Worked example

The example has two titles. “10 Easy Tips for Better Sleep (2024 Edition)!” becomes 10-easy-tips-for-better-sleep-2024-edition. The brackets and exclamation mark are removed.

“Café Crème & Crêpes: A Beginner’s Guide” becomes cafe-creme-and-crepes-a-beginners-guide. The accents are removed, & becomes “and”, and the apostrophe disappears.

Tick Remove short words and the first title becomes 10-easy-tips-better-sleep-2024-edition, a little shorter and just as clear.

What makes a good slug

  • Short and descriptive. Three to six words is a good target.
  • Includes the main keyword. It helps people and search engines know what the page is about.
  • No dates unless needed. A slug without a year stays useful when you update the content.
  • Stable. Once a page is published, avoid changing its slug, or old links will break.

Other uses

Slugs are not only for web pages. They make tidy file names for photos and documents, IDs for headings in a long page, branch names in Git, and keys in spreadsheets or databases where spaces and symbols cause problems.

Tips

  • Remove filler words. Words like “a” and “the” add length without meaning.
  • Use the same rules everywhere. Consistent slugs make a site easier to manage.
  • Set up a redirect if you must change a slug. It sends old links to the new address.

Common mistakes

  • Leaving spaces or capitals. They are encoded as %20 or treated differently by some servers.
  • Copying the full title. Long slugs are hard to share and read.
  • Using non-Latin letters without checking. Letters outside A to Z without accents are removed, so check slugs for titles in other alphabets.

Frequently asked questions

What is a slug?

The readable part of a web address that identifies a page, such as better-sleep-tips in example.com/blog/better-sleep-tips. Good slugs are short, lowercase and use hyphens between words.

Hyphens or underscores?

Use hyphens for web addresses. Google treats hyphens as word separators, while underscores can join words together. Underscores are fine for file names and code identifiers.

What happens to accents and symbols?

Accented letters become plain letters, so café becomes cafe. The & sign becomes "and", @ becomes "at" and % becomes "percent". Other punctuation is removed, and apostrophes disappear so beginner's becomes beginners.

Can I convert many titles at once?

Yes. Put each title on its own line and you get one slug per line, ready to paste into a spreadsheet.

How does the maximum length work?

If the slug is longer than your limit, it is cut, and where possible the cut happens at the end of a whole word, so you do not get half a word at the end.