Text to Slug
Private: nothing leaves your browser
Waiting for text
Turn a headline into a clean URL slug: lowercase, accents flattened, punctuation gone and the words joined with hyphens. Paste a whole list of titles and you get one slug per line. A length limit cuts on a word boundary, never mid word.
About URL slugs
A slug is the readable part at the end of a URL: the how-to-bake-a-cake in example.com/blog/how-to-bake-a-cake. A good one is lowercase, uses only letters, digits and hyphens, and says what the page is about. That is partly for search engines, which read the words in a URL, and mostly for people, who can tell what a link leads to before they click it and can read it out over the phone without spelling anything.
Accents are handled by decomposing each letter into its base plus its accent mark and then dropping the mark, so "Café de Flore" becomes "cafe-de-flore" rather than losing the letter entirely or emitting a percent escaped mess. That works for every accented Latin letter rather than for a short list someone remembered to include.
The length limit cuts on a word boundary. Truncating at exactly 40 characters would leave you "how-to-bake-a-chocol", which reads badly and looks broken, so the slug backs up to the last complete word instead. Many content systems put a limit on the slug field, and a slug over roughly 60 characters is being clipped in the search result anyway, next to the title and description you can draft in the meta tag generator.
How to turn a title into a URL slug
- Paste your headline into the left box, or a list of titles with one per line.
- The slug appears on the right as you type, one per line.
- Pick Separator if your system wants underscores rather than hyphens.
- Set a Max length to cap the slug. It backs up to a whole word.
- Tick Keep capitals only if your platform is case sensitive about paths.
- Press Copy to take the result.
Common questions about URL slugs
Should a slug use hyphens or underscores?
red-shoes is two words and red_shoes is one. Underscores are the right choice for filenames, database columns and anywhere the value is also an identifier in code.
What happens to accented letters and emoji?
Can I convert a whole list of titles at once?
How long should a slug be?
Will changing a slug break my existing links?
Are the headlines I paste in kept anywhere?
Next