Skip to content
FileKit
Text And WritingRuns in your browser5 min read

Slug Generator

This slug generator turns any title or heading into a URL safe slug, the short, lowercase, hyphenated string that appears at the end of a web address. Type or paste a title and the slug updates immediately, with a choice of separator, automatic accent transliteration, and an optional maximum length.

Loading the tool interface
Files never leave your deviceNo upload wait and no queueNo signup, watermark or file limit

A slug has stricter rules than ordinary text. It cannot contain spaces, most punctuation, or characters outside the basic set a URL can carry safely, and search engines and readers both benefit from it being short, readable and consistent. Typing a slug by hand is fine for one page; typing it correctly, every time, for a site with hundreds of pages is where mistakes creep in, an accidental capital letter, a leftover apostrophe, an inconsistent separator between one page and the next.

Every slug is generated locally in your browser using plain string transformations. There is no request sent anywhere, so this url slug generator works exactly the same whether the title is for a public blog post or an unreleased internal page.

What makes a slug URL safe

A URL safe slug uses only lowercase letters, numbers and a single consistent separator character, almost always a hyphen. Every other character, spaces, punctuation, symbols and accented letters, is either removed or converted before it reaches the final slug, since anything else either breaks the URL outright or gets silently percent encoded into an ugly, unreadable string of characters by the browser.

  • Lowercase only: mixed case in a URL is technically valid but inconsistent capitalisation across pages causes confusion and occasional broken links.
  • One consistent separator: hyphens are the web standard, since search engines treat a hyphen as a word boundary the way they treat a space.
  • No accented characters: letters like é or ñ are transliterated to their closest plain ASCII equivalent, e and n, rather than left in place or silently dropped.
  • No stop characters: punctuation such as apostrophes, colons and question marks is removed entirely rather than converted to a separator.

Choosing a separator: hyphen or underscore

A hyphen is the standard choice and the one search engines are built around, since Google has stated plainly that it treats a hyphen in a URL as a word separator, correctly reading my-page-title as three distinct words, while it treats an underscore as joining the words together into one token. Choose the hyphen unless a specific system you are publishing to has a hard requirement for underscores, such as some file naming conventions or legacy content management systems.

How accent transliteration works in this slug generator

Accented letters are decomposed into a base letter plus a separate combining accent mark using Unicode normalisation, and the combining mark is then stripped away, leaving the plain base letter behind. That turns café into cafe and Zürich into zurich, producing a slug built entirely from characters a URL can carry natively without any percent encoding.

This is different from simply deleting characters a URL cannot use. Deleting an accented letter outright would turn café into caf, losing a whole letter and producing a confusing result. Transliteration keeps the letter, just without its accent mark, which is what people expect when they see the slug of a page whose title contained an accented character.

Setting a maximum length

Search engines and social platforms both truncate long URLs in display contexts, and an extremely long slug is harder to read, share and type from memory. Setting a maximum length trims the slug once it reaches the limit, and this slug generator trims at the nearest separator rather than mid word, so the result never ends on a broken half word. A length of 60 to 75 characters is a reasonable target for most blog and article slugs, long enough to be descriptive and short enough to stay readable.

Using this tool to generate seo friendly slug values

Search engines use the words in a URL as a mild ranking signal and, more importantly, display the URL directly in search results, so a slug that reads clearly on its own carries real value beyond just being technically valid. This slug generator is built to make that the default outcome rather than something you have to fix by hand afterward, stripping the punctuation and casing issues that would otherwise leave an awkward or broken looking slug in search results. Under the hood it is a plain browser based way to slugify text without installing a command line package.

How to generate a URL safe slug

  1. 1

    Paste your title

    Type or paste the title, heading or phrase you want to turn into a slug.

  2. 2

    Choose a separator

    Pick a hyphen or an underscore to join the words in the slug. A hyphen is the standard choice for web URLs.

  3. 3

    Set accent and length options

    Turn on accent transliteration if your title contains accented characters, and set a maximum length if needed.

  4. 4

    Generate and copy

    Press generate to produce the final slug, then copy it directly into your CMS or URL field.

Related tools worth bookmarking

Sources and further reading

Frequently asked questions

Common questions about the slug generator.

A hyphen, in almost every case. Search engines treat a hyphen as a word boundary within a URL and correctly read the surrounding text as separate words, while an underscore is often treated as joining the words into a single token instead. Use an underscore only if a specific platform you are publishing to explicitly requires it.

With accent transliteration turned on, an accented letter is converted to its closest plain letter, so é becomes e and ñ becomes n, rather than being dropped entirely or left as an accented character a URL cannot carry safely. This keeps the word recognisable in the resulting slug instead of leaving a gap or an encoded character.

Mixed case in a URL is technically valid, but inconsistent capitalisation across a site's pages leads to confusion, duplicate feeling URLs, and the occasional broken link when a system treats the URL as case sensitive. Lowercase is the consistent, safe default that avoids all of that, which is why it is applied automatically unless turned off.

Yes. Enter a maximum character length and the slug is trimmed to fit within it. The trim always happens at the nearest word separator rather than in the middle of a word, so a length limited slug never ends on an awkwardly cut off half word.

This tool processes one title at a time so you can review each result, but you can run it repeatedly for a list of headings just as quickly, pasting each one in turn. The settings you choose, separator, accent transliteration and maximum length, stay in place between runs so the whole batch comes out consistent.

No. Numbers are kept exactly as they appear, since digits are already URL safe characters and are often meaningful in a slug, such as a model number or a year. Only characters that a URL cannot carry safely, spaces, punctuation and symbols, are removed or converted.