WebzTools
Menu

Text to Slug

A slug is the readable part of a URL that names a page: the 'text-to-slug-converter' at the end of an address. A good slug is lowercase, joins words with hyphens and has no spaces, punctuation or accented characters, which would otherwise be percent-encoded into something unreadable.

Type or paste a title and the slug updates as you type. You can switch the separator between a hyphen and an underscore, and the output between lowercase and uppercase. The tool converts the whole title as written. It does not shorten or reword it, so cutting it down to the words that matter is still your call.

Runs in your browser. Text to Slug processes your input on your own device. Nothing you enter or upload is sent to a server.

Did this tool help you? โ˜•

WebzTools is free to use. If this tool saved you some time, you can support the project with a coffee and help us keep improving the tools.

Buy Me a Coffee (opens in a new tab)

How to use the Text to Slug

  1. Type or paste a title or phrase into the box. The slug appears as you type.
  2. Choose a separator: hyphen (the default) or underscore.
  3. Choose lowercase (the default) or UPPERCASE.
  4. Select Copy Slug and paste it into your CMS, router or file name.

Supported formats: A single line of text. Latin letters, digits, spaces, hyphens and underscores are kept.

What the converter does to your text

  • Accents are removed by splitting each letter from its accent mark, so 'รฉ' becomes 'e'.
  • Every character other than a letter, digit, space, hyphen or underscore is deleted. Ampersands, apostrophes, quotes, brackets and symbols simply disappear instead of being spelled out.
  • Spaces, hyphens and underscores are all treated as word breaks. Any run of them becomes a single separator, and separators at the start or end are trimmed.
  • Digits are kept, so '2026' stays '2026'.

Slug examples

The last row shows what deleting symbols can cost: '+' and '#' carried the meaning, and both are gone. Check slugs for titles like that before publishing.

With the underscore and UPPERCASE options, 'How to Make Cafรฉ au Lait' becomes HOW_TO_MAKE_CAFE_AU_LAIT.

InputSlug (hyphen, lowercase)
How to Make Cafรฉ au Lait: A Beginner's Guide!how-to-make-cafe-au-lait-a-beginners-guide
10 Tips & Tricks (2026 Edition)10-tips-tricks-2026-edition
snake_case and kebab-casesnake-case-and-kebab-case
C++ vs C# in 2026c-vs-c-in-2026

Slugs and URL encoding are different jobs

A slug is something you design: short, readable and free of special characters, so it never needs escaping. Percent-encoding is for when arbitrary text has to travel inside a URL as it is, such as a search term in a query string. For that, use the URL Encoder and Decoder.

If your title needs different capitalisation before it is turned into a slug, run it through the Case Converter first.

Things worth knowing

  • Only Latin letters and digits survive. Text in other scripts, such as Cyrillic or Chinese, is removed entirely, so a title written wholly in one of them produces an empty slug. Transliterate it first.
  • Letters that are not a base letter plus an accent mark, such as รŸ, รธ, รฆ and ล‚, are dropped rather than transliterated: 'StraรŸe' becomes 'strae'.
  • It does not remove stop words such as 'a' or 'the', shorten the slug, or check whether a slug is already used on your site.

Frequently asked questions

Why use hyphens rather than underscores?

Hyphens are the long-standing convention for separating words in URLs, and search engines treat them as word separators. Underscores are more often read as joining characters. The tool defaults to hyphens and offers underscores for file names or systems that require them.

What happens to accented characters?

Most are reduced to the plain letter, so 'cafรฉ' becomes 'cafe'. A few letters do not split into a letter plus an accent and are dropped instead; see Things worth knowing above.

Should I change a slug after publishing?

Only if you have to. Changing a live URL breaks existing links and loses accumulated search signals. If you must change it, put a permanent redirect from the old slug to the new one.

Can it convert a list of titles at once?

No. The input is a single-line box and converts one title at a time, so there is no batch mode.

Is my text sent anywhere?

No. The conversion runs in your browser as you type.

Browse all text tools