URL Slug Generator

Turn a list of titles into clean URL slugs in bulk, following WordPress's or Shopify's own slug rules.

Describe the result you need. AI will set up the tool and ask for any missing details.

Configure with AI

Enter to submit · Shift + Enter for a new line

Sent to AI. Leave out passwords and private customer data.

Your details

0 for no limit.

Slugs

slugs.txt
Men's Merino Wool Beanie   →  mens-merino-wool-beanie
Waxed Canvas Tote — Olive  →  waxed-canvas-tote-olive
Café au Lait Mug (12oz)    →  cafe-au-lait-mug-12oz
Size S/M & L/XL Tee        →  size-s-m-and-l-xl-tee

WordPress's sanitize_title() does the same core job: lowercase, strip accents, replace anything that isn't a letter, number or hyphen with a hyphen, then trim repeats.

Both platforms treat an ampersand as a word, not a symbol to strip, so “Hats & Gloves” becomes “hats-and-gloves” here.

How each platform builds a slug

WordPress's sanitize_title() function and Shopify's automatic product handle both do the same core job: lowercase the text, strip accents, turn an ampersand into “and”, replace anything that isn't a letter, number or hyphen with a hyphen, and trim repeated or trailing hyphens. This tool applies the same rules to a whole list at once.

Example

Title
Café au Lait Mug (12oz)
Slug
cafe-au-lait-mug-12oz

Accents are removed, parentheses become hyphens, and the result stays lowercase with no repeated hyphens.

Where to use the result

  • Bulk-generate product handles before a CSV import, so every row already has one instead of relying on Shopify or WooCommerce to build it automatically.
  • Build category or collection slugs ahead of a site restructure.
  • Turn on “make duplicates unique” when your list has repeated titles, which numbers them the same way WordPress and Shopify do (-2, -3, and so on).

Questions people ask

Do WordPress and Shopify build slugs exactly the same way?

Very closely for ordinary text: lowercase, hyphenated, accents stripped. Both platforms have their own edge cases for unusual characters, so always spot-check a slug that includes symbols or non-Latin text.

Can I set a maximum length?

Yes, set Max length above 0 and the tool cuts at the nearest hyphen rather than mid-word, matching how the platforms avoid overly long handles.

What happens to duplicate titles?

With “Make duplicates unique” on, repeats get -2, -3 and so on appended, the same pattern WordPress and Shopify use when a slug is already taken.

Does this check if the slug is already used in my store?

No, it only generates slugs from your list. Check against your live catalog before a bulk import if avoiding collisions with existing products matters.

Want this builtinto your store?

I'm Emmanuel, a Shopify and WooCommerce developer. If this tool pointed at something you'd rather have fixed for you (a faster store, cleaner product data, a migration, a custom feature), send me a note.

Emmanuel Asika

Emmanuel Asika

Shopify & WooCommerce developer, Dublin

I build and fix online stores: new builds, migrations, speed, SEO and the custom bits apps can't do.

hello@emmanuelasika.com