What makes a good URL slug
A slug is the human-readable part of a URL — the how-to-convert-pdf-to-word in a blog address. It should be lowercase, use hyphens between words, contain only ASCII letters, digits and hyphens, and describe the page in a few words.
The hard part is everything that is not a plain ASCII letter. Accented characters, em dashes, ampersands, smart quotes and emoji all need handling. The naive approach strips them, which destroys words in any language that uses diacritics. This tool decomposes accented characters first and keeps the base letter, so meaning survives the conversion.
Length and stop words
Shorter slugs are easier to read, share and remember. There is no ranking penalty for a long slug, but there is a usability cost — a slug that wraps across two lines in a chat message looks broken. Three to six meaningful words is a good target, and dropping filler words like “the” and “a” usually costs nothing.
For other naming conventions such as camelCase or snake_case, use the case converter. To escape a string for use in a query parameter rather than a path, use the URL encoder.