text tool

Slug generator

This works like the permalink field in a CMS rather than a text box with a button. Type the headline and the URL builds underneath it, in the same monospaced form your address bar will show. Underneath that is a short list of checks on length, word count and what had to be transliterated, and there is a batch mode for a whole list of titles that numbers the repeats the way a CMS does.

Runs on your device. Nothing is uploaded.

Loading the tool…

How to use it

  1. 1

    Type the page title

    The permalink underneath rebuilds on every keystroke. Set the site and folder shown in front of it in the advanced options.

  2. 2

    Read the checks

    They cover length, how many words there are, whether it reads as words rather than digits, and how many accented or non Latin characters had to be folded.

  3. 3

    Copy it

    The dark button copies just the slug, which is what a CMS field wants. The second copies the whole URL for pasting into a message.

  4. 4

    Use batch mode for a list

    Open the list panel, paste one title per line, and you get a table of slugs with any repeat numbered, plus a single copy for the lot.

Folding accents is not enough on its own

The usual trick is Unicode decomposition: normalise the text so an accented letter splits into a plain letter plus a separate combining mark, then delete the marks. That handles French, Spanish and Italian perfectly. It does nothing for the letters where the mark is baked into the character and has no decomposition at all, and those are exactly the ones people hit. Left to decomposition alone, the German eszett vanishes and Straße becomes stra-e, while Cyrillic and Greek titles come back completely empty. So an explicit table handles the rest: eszett becomes ss, ae and oe ligatures spell out, the Nordic slashed o becomes o, thorn becomes th, the Polish crossed l becomes l, and Greek and Cyrillic are romanised letter by letter before decomposition ever runs.

Two right answers for German umlauts

Most tools map o with an umlaut to a plain o, which is cheap and collapses schon and schön onto the same URL. German practice is to write the umlaut as the vowel followed by an e, which is how Schröder becomes Schroeder on a passport. Neither is wrong in general, they are right for different source languages, so the German option in the advanced panel is off by default and switches the whole table, ampersand included, to the German convention.

Symbols become words rather than gaps

An ampersand between two words is doing real work, and deleting it turns coffee & cake into coffee-cake, which reads as one thing rather than two. So the ampersand becomes and, currency symbols spell out as euro, dollar, pound and yen, the per cent sign becomes percent and the at sign becomes at. Apostrophes are removed rather than replaced, so it is stays as its rather than it-s.

Length, stop words and the thing that actually breaks

Three to five words and under about sixty characters is the usual advice, because that is roughly what a search result will show before it truncates. Dropping filler words such as the and of is offered but off by default, since sometimes the filler is what makes the title readable. The genuinely important rule is not in this tool at all: once a URL is published, changing it breaks every link to it unless you add a redirect.

Limits

  • Transliteration is one convention among several. Greek eta becomes i and Cyrillic short i becomes y here; other libraries write them h and j, so a slug generated elsewhere may not match.
  • The German option is only correct for German. Nordic, Estonian, Finnish and Turkish treat the same letters as letters in their own right, not as a vowel plus an e.
  • Chinese, Japanese, Korean, Arabic and Hebrew are not romanised, because that needs a dictionary rather than a character table. A title in those scripts comes back empty and has to be written by hand.
  • The length limit cuts at the last whole word before the limit, which can change the meaning of a truncated slug.
  • Numbering repeats only works within one batch. It has no idea what is already published on your site.

What it does not do

  • It does not check whether the slug is already in use anywhere.
  • It does not set up a redirect from an old URL, which is the thing that actually breaks when you change a slug.
  • It does not percent encode non Latin text the way WordPress does; it romanises what it can and tells you when it cannot.
  • It does not store your titles or your base URL.

Questions people ask

Is my text uploaded anywhere?

No. The slug is worked out in your browser and the page makes no network request after it loads. You can verify that in the network tab of your browser's developer tools: type a title and nothing is sent. Nothing is stored either, so the base URL you set in the advanced options resets when you reload.

How long should a slug be?

Three to five words, and under about sixty characters. That is roughly what a search result shows before it truncates the URL, and it is short enough to read out loud or paste into a message without wrapping. The checks under the preview flag it when you go past either figure, but neither is a hard rule.

Should I remove stop words like the and of?

Sometimes. Removing them makes a slug shorter and puts the meaningful words nearer the front, which is the usual argument for it. But how-to-cook-rice reads better than cook-rice, and a slug nobody can parse is worse than a slug two words longer. The option is there, off by default, so you make the call per title.

Why is my Chinese or Arabic title coming back empty?

Because romanising those scripts needs a dictionary, not a character table. There is no reliable letter by letter mapping from Chinese characters to Latin ones, so rather than produce nonsense the tool tells you nothing survived and asks you to write the slug by hand. Greek and Cyrillic do have letter mappings, so those work.

Why does this differ from the slug my CMS produced?

Mostly transliteration. WordPress does not romanise non Latin scripts at all and percent encodes the raw bytes instead, which is why you see long strings of percent signs in some URLs. Libraries also disagree on individual letters: Greek eta is written i here and h elsewhere. Pick one convention for a site and stay with it.

What does the number on the end of a repeated slug mean?

In batch mode, two titles that produce the same slug cannot both use it, so the second gets a 2 on the end and the third a 3, which is what WordPress and Shopify do. It only counts within the list you pasted, so it has no idea what is already published on your site.

Can I change a slug on a page that is already live?

You can, but every existing link to the old URL will break unless you set up a redirect from the old address to the new one. Search rankings and any links other people have shared follow the redirect, not the new slug on its own. If the page has been up a while, leaving an imperfect slug alone is usually the better trade.

Write the page this slug points at

Take what you made here into documents.

Create a document with OneCraft

Related tools

Sources

Written and checked by the OneCraft team. Last checked .