glunty

Slugify: URL Slug Generator

Type a title, get a URL-safe slug live as you type. Accents to ASCII, spaces to hyphens. Local only.

Separator:

What this tool does

Slugify converts free text, such as an article title or a product name, into a URL-safe slug: the short, readable identifier that goes in the path of a link. It works in one pass as you type. First it transliterates accented and diacritic characters to plain ASCII using Unicode NFKD normalization and then dropping the combining marks. It optionally lowercases the text, replaces whitespace and existing separators with your chosen separator, removes anything that is not a letter or a digit, collapses repeated separators, and trims separators from both ends. Everything happens in your browser; no text is sent anywhere.

How to use it

Type or paste your text in the top box. The slug updates instantly below. Use the Lowercase toggle to keep or fold letter case, pick Hyphen or Underscore as the word separator, and set an optional Max length (leave it at 0 for no limit). Click Copy to put the slug on your clipboard. For example, Creme Brulee & Co. with hyphen and lowercase produces creme-brulee-co.

Common use cases

  • Turning a blog post or news headline into a clean, readable URL path.
  • Generating stable identifiers for docs pages, help articles, or wiki entries.
  • Naming files and folders without spaces or awkward characters.
  • Building anchor ids for headings so they can be linked directly.
  • Creating keys or handles from user-entered names in a predictable way.

Common pitfalls

  • Slugs are not encoders. This tool strips unsafe characters rather than escaping them, so information carried by punctuation or symbols is lost. If you need to preserve a value exactly inside a URL, percent-encode it with a URL encoder instead.
  • Non-Latin scripts may vanish. Characters that do not decompose to a Latin base under NFKD are removed in the cleanup step, so text in scripts like Chinese, Arabic, or Cyrillic can produce an empty slug. For those languages, keep the original characters and percent-encode, or supply a romanized title yourself.
  • Watch for collisions. Two different titles can slugify to the same result once case and punctuation are removed, for example "Q and A" and "Q&A". If slugs must be unique, append a short suffix or id after generating them.
  • Underscores read as one word. Search engines commonly treat a hyphen as a word break but an underscore as a joiner. Prefer hyphens for public URLs and keep underscores for internal systems that require them.

Frequently asked questions

What is a URL slug?
A slug is the human-readable part of a URL that identifies a page in words instead of an opaque id. In "example.com/blog/how-to-brew-coffee", the slug is "how-to-brew-coffee". Good slugs are lowercase, use a single separator between words, contain only unreserved URL characters (letters, digits, and hyphens), and stay short. They help readers and search engines understand what a page is about before they click.
How does slugify handle accented and non-ASCII characters?
It decomposes each character with Unicode NFKD normalization, which splits a letter like e-acute into a plain "e" plus a separate combining accent mark, then strips the combining marks (the range U+0300 to U+036F). So "Creme Brulee" style input becomes plain ASCII. Characters that have no ASCII base form, such as many symbols or scripts that do not decompose to Latin letters, are removed in the final cleanup step because they are not alphanumeric.
Should I use hyphens or underscores in slugs?
Hyphens are the widely recommended choice for public URLs. Search engines have long treated a hyphen as a word separator, while an underscore is often treated as a word joiner, so "brew_coffee" can be read as one token. Underscores still show up in file names, database keys, and some internal systems, which is why this tool offers both. Pick hyphen for pages people will find through search, and underscore only when a downstream system requires it.
Does the tool change the case of my text?
Only if you leave the lowercase option on, which is the default. With lowercase enabled, every letter is folded to lower case so the same title never produces two different URLs that differ only by capitalization. Turn the option off when you need to preserve the original casing, for example when the slug feeds a case-sensitive identifier rather than a public web address.
What does the maximum length option do?
When you set a limit above zero, the slug is cut to that many characters. Rather than slicing through the middle of a word, the tool tries to cut back to the last separator inside the limit so the result ends on a whole word, then trims any trailing separator. If a single word is longer than the whole limit, it is hard-cut so the length is still respected. Leave the field at zero for no limit.
Why did some characters disappear from my slug?
After transliteration, anything that is not a letter, a digit, or the chosen separator is removed. Ampersands, punctuation, emoji, and currency symbols all drop out, and the spaces around them collapse into a single separator. This is intentional: URLs should only contain safe, unreserved characters, so "Q&A: Tips!" becomes "qa-tips". If you need to keep special characters in a value, percent-encode it with a URL encoder instead of slugifying it.
Does slugify send my text anywhere?
No. The entire pipeline runs in your browser using built-in JavaScript string methods, so nothing you type leaves your device. You can confirm this by opening DevTools and watching the Network tab while you type: there are zero requests. That makes the tool safe for internal titles, unpublished headlines, or any text you would rather not paste into a remote service.

Embed this tool

Free for any use; attribution appreciated. Paste this on your site:

The embed runs the same tool that lives at this URL. No tracking; no ads inside the embed. Resize height as needed for your layout.

Cite this tool

For academic, journalistic, or technical references. Pick a format:

Citations use 2026 as the publication year. Access date is left as a fillable placeholder where the citation style expects one.

Embedded tool from glunty.com