What Is This Tool?
A slug is the URL-friendly part of a web address that identifies a specific page, like the 'my-awesome-post' in example.com/blog/my-awesome-post. It's typically derived from the page title, lowercased, with spaces and punctuation replaced by a separator.
Good slugs are short, readable, and made only of lowercase letters, numbers, and a separator — no spaces, accented characters, or special symbols that could break links or confuse search engines.
Why Use It?
- Live preview: see the generated slug update as you type, no button clicks needed.
- Choose hyphen or underscore as the separator, and optionally keep original casing.
- Optional max-length truncation that avoids cutting a word in half.
- Transliterates common accented characters (é, ñ, ü, etc.) to plain ASCII instead of just deleting them.
- Runs entirely in your browser — nothing is uploaded or logged.
How to Use
- Paste or type your title or text into the input box.
- Pick a separator (hyphen or underscore) and toggle lowercase if needed.
- Optionally set a maximum length to keep slugs short.
- Copy the generated slug with one click.
Example
Input
10 Tips for Building a Café in São Paulo!Output
10-tips-for-building-a-cafe-in-sao-pauloAccents are transliterated, punctuation is stripped, and spaces become hyphens.
Common use cases
- Blog and CMS platforms: generate a clean slug from an article title for the post URL.
- E-commerce: build product URLs from product names for cleaner, more shareable links.
- Static site generators: many require a slug field in frontmatter derived from the page title.
- File and asset naming: turn arbitrary text into safe filenames without spaces or special characters.
Slug best practices
Keep slugs short and descriptive — long URLs are harder to share and can get truncated in search results. Avoid stop words like 'a', 'the', or 'and' when you need to shorten a slug further.
Once a URL with a given slug is published and indexed, avoid changing it — that breaks inbound links and search rankings unless you also set up a redirect. Decide on your separator convention (hyphens are the widely recommended default) before publishing content, since mixing styles across a site looks inconsistent.
Frequently Asked Questions
Why lowercase the slug?
Search engines and most web servers treat URLs as case-sensitive, so mixed casing can create duplicate-content issues (e.g. /Post and /post being different pages). Lowercase avoids that entirely.
Hyphen or underscore — which is better for SEO?
Google has recommended hyphens since 2010 because it treats them as word separators, while underscores can be read as joining words together. Hyphens are the safer default for public URLs.
What happens to accented or non-Latin characters?
Common accented Latin characters (é, ñ, ü, ç, etc.) are transliterated to their closest ASCII equivalent. Characters outside that map (like CJK or Arabic script) are stripped, since most URL slug conventions expect ASCII only.
Why does the max-length option avoid cutting words?
Truncating at a strict character count can chop a word in half, which looks broken in a URL. The tool trims back to the previous separator instead, so the slug always ends on a whole word.
Is any of my text sent to a server?
No. The conversion happens entirely with local JavaScript in your browser. Nothing you type is uploaded, stored, or logged.