Skip to main content
CaseSwitch

Slug Generator

Use the CaseSwitch Slug Generator to turn a blog title or phrase into a URL-safe path segment (how-to-fix-caps-lock). Paste the text, review the hyphenated result, and copy it for your CMS. Generation runs in this browser — nothing is uploaded.

Written by the CaseSwitch editorial team. We maintain these tools in the browser so drafts, keys, and images stay on your device.

Last reviewed: 23 July 2026

Processed locally in your browser. Nothing is sent to a server.

Paste or type text to convert. Output stays empty until there is input.

Character count: 0 · Word count: 0 · Line count: 0

Examples

Blog title with punctuation

Input

How to Fix Caps Lock!

Output

how-to-fix-caps-lock

Simple two-word phrase

Input

Hello World

Output

hello-world

Accent folding

Input

café résumé

Output

cafe-resume

Numbers kept, symbols stripped

Input

100% Free Guide

Output

100-free-guide

Em dashes collapse to one hyphen

Input

A  —  B

Output

a-b

How to use

  1. Paste the page title or a short descriptive phrase into the input panel.
  2. Review the hyphenated output. Shorten stop words by hand if your SEO style prefers a tighter path.
  3. Copy the slug into your CMS permalink field. After the page is public, keep it stable or add a redirect if you must change it.

What this tool is for

A slug is the URL-safe tail of a page address: how-to-fix-caps-lock. This generator lowercases, hyphenates, strips characters that do not belong in a path, and folds common accents so a human title becomes a stable, readable permalink. It is for the path in the address bar, not the visible H1 readers see. Use it before you publish a blog post, docs page, or CMS entry that needs a clean link.

How it works

The input is normalized (NFKD) so combining marks can be stripped, then lowercased. Any run of characters that is not a–z or 0–9 becomes a single hyphen. Leading and trailing hyphens are removed. Accents such as é become e (café → cafe). Punctuation, emoji, and symbols disappear rather than sticking to the slug. The default separator is a hyphen.

When to use it

Blog posts, documentation pages, product listing URLs, knowledge-base articles, and CMS permalink fields when you have a working title and need a path before publish. Also useful for turning a noisy marketing headline into a short candidate slug you can still edit by hand.

When not to use it

Do not slugify a sentence and use it as the article title — keep title case or your house style for the H1. Do not change slugs on already-indexed pages without redirects. Do not slugify secrets or tokens. Do not expect this tool to guarantee uniqueness across your site; collision checks belong in the CMS.

How it compares to related tools

kebab-case is a lighter identifier transform and does not strip punctuation or fold accents the same way. snake_case keeps underscores for code and SQL. Title case formats the heading users read; the slug formats the address bar. Longer notes: SEO URL slugs and kebab-case and Developer naming conventions.

Common mistakes

Creating 80-character slugs from a whole subtitle. Embedding dates that will look stale next year. Publishing two posts with the same slug. Regenerating a live URL after a small title tweak and dropping the old rankings. Treating the slug as encryption or obfuscation — anyone can read it.

Slug length, stop words, and redirects

Short slugs are easier to share and often clearer in search snippets. Drop filler words (a, the, and) when the remaining tokens still describe the page; keep words you actually want associated with the URL. Once a path is indexed, treat it as permanent: if the title changes a lot, leave the old slug and add a 301 redirect rather than breaking bookmarks and backlinks.

Accents, percentages, and separators

NFKD normalization plus mark stripping turns café into cafe and résumé into resume so the path stays ASCII-friendly for older systems. Digits stay (100-free-guide). Percent signs, exclamation marks, and em dashes become hyphens or disappear into adjacent hyphens, which is why “A — B” becomes a-b. The default separator is “-”; that matches how most public sites write kebab-case paths.

Frequently asked questions

Should slugs include stop words like “the” and “and”?+

Short slugs rank and get shared more easily. Drop filler when the remaining words still describe the page. Keep words you actually want to rank for.

Do I need to regenerate a slug after editing the title?+

Only if the URL is not public yet. After indexing, keep the old slug and add a redirect if the title changes a lot.

How are accents handled?+

Combining marks are stripped after Unicode normalization, so café becomes cafe and résumé becomes resume in the slug.

Is this the same as the kebab-case converter?+

No. kebab-case mainly splits on existing word boundaries. The slug generator also removes punctuation and folds accents for URL paths.

Can two pages share a slug?+

Not safely. This tool does not check your site for collisions. Your CMS or static-site generator should enforce uniqueness.

Does the slug become the page title?+

No. Keep a human title (often title case) for the H1 and browser tab. The slug is only the path segment.

Is my title uploaded?+

No. Generation runs in this browser. You can disconnect after the page loads and still build a slug.

Does this tool send my payload to CaseSwitch?+

No. Formatting, encoding, and naming conversions for this page run in your browser after load — your sample stays on the device.

Related guides

Read our original articles on this topic.

Related tools

kebab-case Converter

CSS class names and BEM blocks, REST path segments, data-testid values, design-token names that a style guide wants dashed, and a first-pass convert from camelCase props into a URL-ish token. Paste one name per line for bulk work.

UTM URL Generator

Email campaigns, partner posts, QR codes to a campaign landing page, paid ads that your analytics still reads as UTM, and standardizing naming before a launch.

QR Code Generator

Event posters, packaging, Wi-Fi guest cards, linking a flyer to a landing page, and encoding a short support URL after you build campaign params with the [UTM URL Generator](/utm-url-generator/).

camelCase Converter

Migrating SQL columns to a Node API, turning spreadsheet headers into TypeScript property names, renaming CSS modules that a linter wants in camelCase, and converting a design-doc phrase into a variable name. Paste a list, one identifier per line, for bulk work, then review acronyms before you commit.

PascalCase Converter

Naming React components and matching file names to their default export, generating TypeScript interfaces from a design-doc phrase list, turning SQL or API field labels into C# or Java class names, and converting a kebab-case or snake_case token into a type name. Paste one identifier per line for bulk work, then review acronyms before you commit.

snake_case Converter

Aligning a Node or TypeScript mapper with PostgreSQL column names, generating Python method names from a product spec, turning spreadsheet headers into database fields, and preparing keys that will later become environment-style constants (then uppercasing). Paste one identifier per line for bulk work.

dot.case Converter

Building i18n keys, namespacing telemetry events, matching a config schema that already uses dotted paths, and turning spreadsheet headers into lodash-style accessor strings. Paste one identifier per line for bulk work, then shorten overly deep keys by hand.