← Text

Slug Generator

Paste one or more titles and get clean, lowercase, URL-safe slugs with the separator and length you need.

Titles

Cuts at a word boundary. Blank or 0 for no limit.
Options

Slugs

First slug
–
TitleSlugLength

All slugs


      

URL preview

    How characters are handled

    InputBecomesRule
    Space, tab, punctuation- or _Any run of non-letters and non-digits becomes one separator.
    é ü ñ çe u n cNFD decomposition, then combining marks removed.
    ß æ œ ø ł đ þss ae oe o l d thExplicit map for letters that do not decompose.
    it's, don'tits, dontApostrophes are deleted rather than turned into separators.
    &andAmpersand is spelled out.
    2.5, 10,0002-5, 10-000Digits are kept; the punctuation between them becomes a separator.
    Кириллица, 中文unchangedLetters with no Latin equivalent are kept.

    About this tool

    This slug generator converts page titles, headlines, product names, or file names into URL slugs, one per line, so you can paste a whole list of titles and get a matching list of slugs back. Accented and special Latin letters are transliterated to plain ASCII (é to e, ß to ss, ø to o), punctuation and spaces become a single hyphen or underscore, and everything is lowercased. Optional controls strip common English stop words such as the, of, and a, cap the slug at a maximum length without cutting a word in half, and make duplicate slugs unique by adding -2, -3, and so on. A URL preview shows each slug appended to a base address of your choice. It is built for bloggers, content managers, developers naming routes or files, and anyone tidying up permalinks.

    How it works

    Each line is processed independently. Transliteration applies Unicode NFD normalization, which splits letters like é into a base letter plus a combining accent, then removes the combining marks (U+0300 to U+036F). Letters that do not decompose are mapped explicitly: ß to ss, æ to ae, œ to oe, ø to o, đ to d, ł to l, þ to th, ð to d. Apostrophes are deleted so "it's" becomes "its" rather than "it-s". The text is lowercased, every run of characters that is not a letter or digit is replaced with the chosen separator, repeated separators are collapsed, and leading and trailing separators are trimmed. With stop-word removal on, words from a list of about 35 common English function words are dropped unless that would leave the slug empty. A maximum length cuts the slug at the last separator before the limit so no word is truncated. Unicode letters without a Latin equivalent, such as Cyrillic or Chinese, are kept, since modern browsers accept them in URL paths.

    Frequently asked questions

    Should I use hyphens or underscores in URL slugs?

    Hyphens. Google has stated since 2010 that it treats a hyphen as a word separator but an underscore as a word joiner, so "blue-widgets" is read as two words while "blue_widgets" is one token. Hyphens are also easier to see in an underlined link. Underscores remain common for file names and database identifiers, which is why the option exists.

    How long should a slug be?

    There is no hard technical limit below a few thousand characters, but shorter slugs are easier to read, share, and type. Many style guides aim for three to five meaningful words, roughly 30 to 60 characters. Set a maximum length and the tool cuts at a word boundary, so a 60-character limit never ends in a half word.

    Which stop words are removed?

    A list of about 35 short English function words: a, an, the, and, or, but, of, in, on, at, to, for, with, by, from, as, is, are, was, were, be, been, it, its, this, that, these, those, into, over, under, up, down, about, if, then, than, so, very. Removal is optional because titles like "To Be or Not to Be" would otherwise be emptied; when every word is a stop word the original slug is kept.

    What happens to characters like ß, ø, or Chinese text?

    ß becomes ss, æ becomes ae, ø becomes o, ł becomes l, and other Latin letters with accents lose the accent. Letters from scripts with no Latin equivalent, such as Cyrillic, Greek, Arabic, or Chinese, are kept as they are, because browsers and most web servers accept Unicode in URL paths and display it readably. Turn transliteration off if you want accented Latin letters kept too.

    Related tools

    Word Counter · Case Converter · Text Diff · Lorem Ipsum Generator · Line Tools · Find and Replace · Markdown Preview · Text Cleaner

    Browse all Text Tools, or go back to every free tool on HeroYears.