01What is Text to Slug?
A slug is the readable part of a URL that names a page, like /blog/creme-brulee-recipe. Text to Slug builds one from a title or phrase as you type, so you don't have to hand-edit accents, apostrophes and stray spaces every time you publish something. The conversion runs in a fixed order. First, a small lookup table swaps letters that Unicode can't split into a base letter plus an accent: ß becomes ss, æ becomes ae, œ becomes oe, ø becomes o, ł becomes l, đ and ð become d, and þ becomes th. Next the text goes through Unicode NFD normalisation, which separates é into e plus a combining accent mark. The tool then deletes those marks, so é, ñ and ü end up as e, n and u. After that it lowercases the text (unless you untick Lowercase) and removes anything that isn't an ASCII letter, a digit, whitespace, a hyphen or an underscore. Removal matters here. Punctuation is dropped rather than turned into a separator, so "It's" becomes its and "Next.js" becomes nextjs. Every run of spaces, hyphens and underscores then collapses into one separator, and separators at either end are trimmed. You can pick a hyphen, an underscore or a dot as that separator. The output only uses unreserved URL characters as defined in RFC 3986 (letters, digits, hyphen, underscore and dot), so it never needs percent-encoding. Google's own URL structure guidance suggests hyphens rather than underscores between words, which is why hyphen is the default. Here's a quick example. Type "Crème Brûlée & Straße" and you get creme-brulee-strasse. The ampersand vanishes and the two spaces around it merge into a single hyphen. Set Max Length to 20 on "How to Write Great URL Slugs for SEO" and you get how-to-write-great, which is 18 characters. The tool cuts back to the last whole word instead of leaving half a word dangling. There are honest limits. Cyrillic, Greek, Arabic and CJK characters are deleted, not transliterated, so "Привет мир" produces an empty slug. Symbols carry no meaning either: "C++ vs C#" turns into c-vs-c. The tool also doesn't check for duplicates, so two posts with the same title will get the same slug. The conversion happens in the page's own script, and your titles stay in the browser tab.
Developers and content editors who need clean, ASCII-only URL paths, file names or anchor IDs from titles that contain accents and punctuation. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Text to Slug
- Type or paste your title into the Input Text box
- Choose a Separator: Hyphen (-), Underscore (_) or Dot (.)
- Set Max Length if you need a cap, or leave it at 0 for no limit
- Untick Lowercase if you want to keep the original capital letters
- Check the Slug box and its character count, then click the copy button
03Worked examples
- Input:
Hello, World! It's 2026 - Result:
hello-world-its-2026 - Punctuation is dropped, not replaced, so "It's" becomes "its".
- Input:
Crème Brûlée & Straße - Result:
creme-brulee-strasse - Accents are stripped and ß becomes "ss". The lone "&" disappears and the spaces around it merge into one hyphen.
- Input:
--My__Blog Post-- (separator _) - Result:
my_blog_post - Runs of spaces, hyphens and underscores collapse into one separator, and separators at the ends are trimmed.
- Input:
How to Write Great URL Slugs for SEO (max length 20) - Result:
how-to-write-great - The limit cuts at the last whole word, so the result is 18 characters rather than a chopped word at 20.
- Input:
Getting Started with Next.js 15 (separator .) - Result:
getting.started.with.nextjs.15 - The dot inside Next.js is removed as punctuation before dots are added as separators.
- Input:
Привет мир - Result:
(empty) - Cyrillic letters are removed, not transliterated, so nothing is left.
04Common use cases
- Turning a blog post title into a permalink before you publish it in a CMS that doesn't create slugs itself
- Building safe file names from document titles before uploading them to a bucket or shared drive
- Converting product names with accents, like Crème Brûlée Kit, into ASCII paths for an online store
- Producing heading IDs for anchor links in a Markdown or documentation site
- Creating dot-separated keys, such as getting.started.guide, for translation or config files
- Checking what a seeding script should produce before writing the slug logic into your own code
05Tips
- Word-boundary truncation saves you a cleanup step. A cap of 20 on a long title gives how-to-write-great, not a slug ending in half a word or a trailing hyphen.
- Stripping accents is not translation. German über becomes uber here, while some German-focused slug libraries write ueber. Apply your own rule first if readers expect that spelling.
- Symbols such as + and # disappear, so C++ and C# both end up as c. Spell them out (cpp, csharp) in the input when they matter.
- Keep the original title in your database next to the slug. Slugs can't be turned back into titles, and you'll want a numeric suffix or ID to handle two posts with the same name.
- Once a page is live, changing its slug breaks old links. Add a 301 redirect from the old path if you rename it.
06Related concepts
URL encoding, Transliteration, SEO URLs, Permalink.
Frequently Asked Questions
What is Text to Slug?
Text to Slug is a free, browser-based developer tool on AIDToolStack. Convert text to URL-friendly slugs with customizable options. It requires no installation or sign-up and works entirely in your browser.
Is Text to Slug free to use?
Yes. No sign-up, no fees and no usage cap.
Does Text to Slug store my data?
No. It runs in your browser; nothing is uploaded.