Slug Generator
Convert titles and phrases to URL-friendly slugs — kebab-case, snake_case, or custom separators for SEO-friendly URLs.
What is a URL Slug?
A URL slug is the human-readable, URL-friendly portion of a web address that identifies a specific page. For example, in the URL https://example.com/blog/how-to-build-a-rest-api, the slug is "how-to-build-a-rest-api". Slugs replace spaces with hyphens, remove special characters, and use only lowercase letters, numbers, and hyphens.
Good URL slugs are important for both SEO and usability. Search engines use the words in a URL as ranking signals. Short, descriptive, keyword-rich slugs help search engines understand page content and improve click-through rates in search results. They also make URLs shareable and memorable for users.
This generator converts text to slugs by lowercasing all letters, replacing non-alphanumeric characters with the chosen separator, collapsing multiple consecutive separators into one, and trimming separators from the start and end. It also handles Unicode characters by removing accents from Latin letters (é→e, ñ→n, ü→u) before processing.