Text & Writing Tools

URL Slug Generator

Turn titles into clean, lowercase URL slugs with accents removed, hyphens or underscores, optional stop-word removal and bulk mode.

  • Free
  • No sign-up
  • Runs in your browser

Slug Generator

Slug
--

Runs in your browser. Your inputs never leave your device.

Quick Answer

A URL slug is the readable part of a web address that identifies a page, such as percentage-change-calculator. To make one, lowercase the title, remove accents, replace spaces and punctuation with hyphens and trim the ends: 'Héllo, Wörld! 2026' becomes hello-world-2026. Keep slugs short and descriptive, and do not change them once a page is published.

How to Use

  1. Type the title. Enter the page or post title, or switch to Bulk mode and paste one title per line.
  2. Choose the options. Pick hyphens or underscores, and optionally remove stop words or set a maximum length.
  3. Copy the slug. Copy the slug and use it as the last part of the page's URL.

Good and Bad Slugs

Examples of good and weak URL slugs
PageWeak slugBetter slug
How to Make Sourdough Bread at Homepost?id=4172sourdough-bread-at-home
Our Refund PolicyOur_Refund_Policyrefund-policy
Café Opening Hourscaf%C3%A9-opening-hourscafe-opening-hours
10 Best Laptops for Students10-best-laptops-for-students-2024-cheap-bestbest-student-laptops

Slug Checklist

  • Short and descriptive: a reader should guess what the page is about from the URL alone.
  • Lowercase with hyphens: consistent, easy to type and recommended by Google.
  • No dates or numbers that will change: unless they are part of what the page is.
  • Stable: once published, keep the slug. If you must change it, redirect the old URL permanently.
  • Unique: two pages in the same folder cannot share a slug; bulk mode numbers repeats for you.

ToolsBuilt follows these rules for its own pages, such as /tools/remove-duplicate-lines/ and /tools/text-diff-checker/. Everything on this page runs in your browser and nothing you type is stored.

How a Slug Is Built

Title → NFD normalise and remove accents → lowercase → non-letters and non-digits become the separator → collapse repeats → trim the ends

Unicode NFD normalisation splits letters such as é into e plus an accent mark, and the marks are removed. Letters that do not split (ß, æ, ø, ł) are written out as ss, ae, o and l, and & becomes 'and'. Everything that is not a letter or a digit becomes a single separator, and separators at the start or end are removed. Optional steps drop common English stop words and cut the slug at a word boundary so it stays within a maximum length. Letters from non-Latin scripts are kept, because browsers display them, but you may prefer to translate the title first.

  • Separator: Hyphens (-) are the usual choice for URLs; underscores (_) suit file names and some systems.
  • Stop words: Short words such as a, the, and, of, to that rarely help a URL. At least one word is always kept.
  • Max length: Cuts the slug before the word that would go over the limit, so words are never chopped in half.

Worked Examples

Accents and punctuation

Title: Héllo, Wörld! 2026

  1. Remove accents: Hello, World! 2026
  2. Lowercase and replace punctuation and spaces: hello-world-2026

Result: hello-world-2026

Extra spaces and underscores

Title: ' Multiple Spaces ' · Separator: hyphen, then underscore for 'Hello World'

  1. Runs of spaces become a single separator and the ends are trimmed

Result: multiple-spaces, and hello_world with the underscore separator

Maximum length at a word boundary

Title: percentage change calculator · Max length: 10

  1. 'percentage' is 10 characters; adding '-change' would make 17

Result: percentage

Common Mistakes to Avoid

  • Changing the slug of a live page: A new slug is a new URL. Links, bookmarks and search results that point to the old address break unless you set up a permanent (301) redirect. Choose the slug carefully before publishing.
  • Stuffing keywords into the slug: best-cheap-free-calculator-online-calculator-tool reads as spam. A short, accurate slug that matches the page title is easier to read and share.
  • Using dates that will go out of date: A slug like best-laptops-2024 looks stale the following year, and changing it later means a redirect. Leave dates out unless the page is about a specific year.
  • Mixing upper and lower case: Paths on many servers are case-sensitive, so /About-Us and /about-us can be different pages. Lowercase slugs avoid duplicate URLs.
  • Using underscores in web addresses: Google's guidance recommends hyphens to separate words in URLs; words joined by underscores can be read as a single word.

Frequently Asked Questions

What is a URL slug?

It is the part of a web address that names a specific page, usually after the last slash. In toolsbuilt.com/tools/slug-generator/ the slug is slug-generator.

Should I use hyphens or underscores in URLs?

Use hyphens. Google recommends hyphens to separate words in URLs, and they are the common convention. Underscores are fine for file names.

Should I remove stop words like 'the' and 'and' from slugs?

Often, yes, when it makes the slug shorter without losing meaning, such as write-best-guide instead of how-to-write-the-best-guide. Keep them if the slug reads badly without them.

How long should a URL slug be?

There is no fixed limit, but three to five meaningful words is a good target. Use the max length option to keep slugs within a limit without cutting words.

How are accents and special characters handled?

Accents are removed with Unicode normalisation, so é becomes e and ü becomes u; ß becomes ss, and & becomes 'and'. Other symbols turn into the separator.

Can I make slugs for many titles at once?

Yes. Use Bulk mode and paste one title per line. Turn on unique numbering to add -2, -3 and so on to repeated slugs.

Does changing a slug affect SEO?

Changing the URL of an existing page means search engines must find the new address. Use a 301 redirect from the old slug so links and rankings carry over.

Sources & References