Slug & URL-Safe String Generator

Slug & URL-Safe String Generator

What Is a Slug?

A "slug" is the clean, URL-safe version of a title used in a web address - lowercase letters, digits, and hyphens only, with spaces and punctuation stripped out. "Spider-Man: Homecoming" becomes spider-man-homecoming; a blog post titled "10 Tips for Better Sleep!" becomes 10-tips-for-better-sleep. Slugs matter for SEO (search engines favor readable, keyword-bearing URLs over auto-generated IDs), readability, and avoiding characters that need escaping in a URL.

The same transformation is useful for generating web-safe filenames too - stripping spaces and special characters from a batch of photo titles or export names before they get uploaded somewhere, so every file has a predictable, database- and URL-friendly name.

What This Tool Handles

Batch, Line by LinePaste as many titles or filenames as you want - each line converts independently, ready to paste back into a spreadsheet.
Diacritic StrippingAccented characters like "é", "ñ", and "ü" are normalized to their plain ASCII equivalent instead of being dropped or mangled.
Filename ModeKeeps a single file extension intact (lowercased) while slugifying only the base name - "My Photo.JPG" → "my-photo.jpg".
Duplicate DetectionThe summary line flags how many of your converted slugs collide with each other, so you can catch naming conflicts before they hit a database.

Frequently Asked Questions

Does this tool send my titles or filenames anywhere?

No - every conversion happens locally in your browser using plain JavaScript string operations. Nothing you type is uploaded or sent to a server.

What happens to accented characters like é or ñ?

They're normalized to their closest plain ASCII letter using Unicode NFD decomposition (so é becomes e, ñ becomes n) rather than being deleted, so the slug stays readable instead of losing letters.

Can I generate underscore-separated slugs instead of hyphens?

Yes - switch the Separator dropdown to underscore. Hyphens are the more common convention for URL slugs, but some systems (like some database keys or older CMSes) expect underscores.

Why does Filename mode keep the file extension separate?

A file extension like .jpg or .pdf needs to stay exactly as-is (lowercased) for the operating system and browsers to recognize the file type - only the base filename before the extension gets slugified.