spyc.ai

Free tool

URL Slug Generator

Turn a title into a clean URL slug, with options for separator, stop words, accents and maximum length.

How it works

What is the URL Slug Generator?

The URL Slug Generator is a free tool that turns a title or phrase into a URL slug. It lowercases the text, replaces spaces and symbols with hyphens or underscores, and can strip accents, remove stop words and cut the result to a maximum length at a word boundary. Each line is converted separately.

How to use the URL Slug Generator

  1. Type or paste a title, one per line, or press Load sample.
  2. Pick the separator: hyphen or underscore.
  3. Set a maximum length, and choose whether to remove stop words and convert accented letters.
  4. Press Copy slug and use it as the last part of the page URL.

What is a URL slug?

A slug is the part of a URL that names one page, usually the last segment of the path. In https://example.com/blog/how-to-bake-bread, the slug is how-to-bake-bread. It is normally built from the page title: lowercase, words joined by hyphens, punctuation removed.

A readable slug tells a person what the page is before they click, and it survives being pasted into a chat or an email without turning into a string of percent codes.

How does the slug generator convert a title?

In a fixed order. Apostrophes are removed, so don't becomes dont, and & becomes and. Accented letters are converted to their plain forms if that option is on: é to e, ü to u, ß to ss. The text is lowercased, and every run of characters that is not a letter or digit becomes one separator. Stop words are removed if you asked for that, and last the slug is cut to the maximum length.

Separators never appear at the start or end, and never twice in a row.

Should a URL slug use hyphens or underscores?

Hyphens. Google's guidance on URL structure recommends hyphens to separate words and advises against underscores. Hyphens are also the convention readers expect in a web address.

The underscore option is there for the cases where a slug is not going into a public URL: file names, database keys, anchor IDs or systems with their own naming rule.

Should I remove stop words from a slug?

It is a matter of taste and length, not a ranking rule. Dropping words such as a, the, of and to makes a slug shorter, and tips-writing-great-blog-post is as clear as the full version. But some titles change meaning or become awkward without them, so the option is off by default.

The tool removes a fixed list of 23 common English words. If a title consists only of stop words, they are kept, so you never get an empty slug.

How long should a URL slug be?

There is no official limit. As a rule of thumb, keep it to the few words that identify the page, often three to six. Long slugs get truncated in search results and are harder to read and share.

The maximum length setting, 60 characters by default, cuts at a word boundary so no word is chopped in half. Set it to 0 for no limit. If you change the slug of a page that is already live, redirect the old URL to the new one. To check a page's canonical URL after a change, use the Canonical Tag Scanner, and to encode other URL parts use the URL Encoder Decoder.

Questions

Do URL slugs affect SEO?
Slightly. Google has described words in a URL as a very lightweight ranking factor. The larger benefit is to people, who can read the URL and tell what the page is about.
Should slugs be lowercase?
Yes. URL paths can be case-sensitive, so mixed case risks two addresses for one page. The tool always lowercases.
What happens to accented and non-Latin characters?
With conversion on, accented Latin letters become plain ASCII. With it off, they are kept. Characters from other scripts, such as Cyrillic, Chinese or Arabic, are removed in both modes, because the tool does not transliterate them.
Can I change a slug after publishing?
Yes, but add a 301 redirect from the old URL to the new one, or links and search listings that point to the old address will break.
Is the URL Slug Generator free?
Yes, with a free spyc.ai account. It runs in your browser, so nothing you type or paste is sent to a server.

Developer Tools

More in Developer Tools

JSON Formatter

Format, minify and validate JSON in your browser, with the line and column of the first syntax error.

Format JSON

JSON-LD Formatter

Pretty-print JSON-LD pasted bare or in script tags, list every @type and flag a missing @context.

Format JSON-LD

Case Converter

Convert text to upper, lower, title or sentence case, or to camelCase, PascalCase, snake_case and kebab-case.

Convert case

Ready when you are

Before your next buyer asks AI about you, ask AI about yourself

One check, four engines, about twenty seconds. We show you the answers before we ask for anything.