Slug Generator
Generate online slugs from titles with separators, casing, Unicode handling, length caps, batch dedupe, and target checks for safer URLs.Slug Generator
{{ primarySlugText || 'Waiting for source text' }}
| Source | Target | Value | Chars | Fit | Copy |
|---|---|---|---|---|---|
| No slug variants yet. | |||||
| {{ row.sourceLabel }} | {{ row.target }} | {{ row.value }} |
{{ row.characters }} | {{ row.fit }} |
| Target | Recommended value | Review | Why | Copy |
|---|---|---|---|---|
| No paste targets yet. | ||||
| {{ row.target }} | {{ row.value }} |
{{ row.review }} | {{ row.why }} | |
Introduction
A slug is a short readable identifier used in a URL path, file name, anchor, CSS selector, or content system key. Good slugs remove spacing and punctuation surprises while keeping enough words for a person to recognize the page or record later.
URL syntax reserves characters such as /, ?, #, and & for structural meaning. A slug avoids those characters in the path segment itself, which makes the value easier to copy, compare, and route without accidental parsing changes.
Slug quality is partly technical and partly editorial. A short identifier is easier to scan, but cutting too many words can make two pages look alike or hide the meaning of a heading.
Technical Details:
Slug generation starts by turning a title into word tokens. Camel-case boundaries, digit boundaries, accent marks, and symbol words such as &, +, @, and % are handled before the words are joined.
The generated value then passes through casing, separator, stop-word, and length rules. The default path favors lowercase ASCII words joined by hyphens because that form is readable and avoids percent-encoding in most URL segments.
Transformation Core:
| Option | How It Changes the Slug | Output Cue |
|---|---|---|
Character handling |
ASCII-safe folds accent marks. Unicode keeps non-ASCII letters. Strict ASCII keeps ASCII tokens only. |
The summary badge reports ASCII-safe, Unicode kept, or strict ASCII. |
Separator |
Hyphen, underscore, or dot joins the tokens. The paste checklist marks non-hyphen public URL choices for review. | Search URL shows Ready for hyphen output and Review otherwise. |
Maximum length |
Values are clamped from 8 to 160 characters. Smart trim backs up to a separator when a cut would leave a partial word. |
Warnings report slugs trimmed to the maximum length. |
Remove stop words |
Common connector words are dropped only when at least one token remains. If every token would be removed, the original tokens are kept. | Warnings report how many stop words were removed. |
Batch mode |
Each non-blank source line becomes its own slug. Duplicate batch slugs can receive numeric suffixes while respecting the length cap. | The summary reports the number of slugs and target checks. |
Slug Variant Ledger expands each primary slug into URL segment, path, filename, anchor, HTML id, CSS class, snake_case, dot.path, and section-id variants. Paste Target Checklist then adds review labels for the targets most likely to break when length, separator, or Unicode choices are wrong.
Unicode slugs can be valid in modern systems, but copied paths may display as percent-encoded text. The Encoded path row shows what that escaped form looks like before the value reaches a route, CMS, or analytics system.
Everyday Use & Decision Guide:
For a public URL, start with Separator set to Hyphen, Letter case set to Lowercase, Character handling set to ASCII-safe, and Maximum length around 48 to 72 characters. That usually produces a readable path segment without extra encoding.
Use Preserve source case, underscores, or dots only when matching a route convention, code name, metric path, or existing file naming pattern. Those forms may be correct for technical targets even when the checklist marks them for review as public URL choices.
- Turn on
Batch modebefore pasting several titles; otherwise only the first non-blank line is active. - Keep
De-duplicate batch slugson when multiple headings may normalize to the same value. - Check
CMS permalinkwhen the primary slug is long; the row flags values above 72 characters. - Use
ID prefixwhen a numeric title needs a safe HTML id or CSS selector.
A generated slug is a candidate, not a publishing plan. Before changing a live URL, check redirects, internal links, analytics references, and any system that stores the old path.
Step-by-Step Guide:
- Paste a title, heading, file name, or one-title-per-line batch into
Source text. - Click
Normalize spacesif the source has copied line breaks or repeated spacing that should not affect tokens. - Choose
Separator,Letter case, andCharacter handlingfor the target system. - Set
Maximum lengthand leaveSmart trimon when a readable word boundary matters. - Open
Slug Variant Ledgerto compare URL, filename, anchor, CSS, snake_case, and dot-path forms. - Open
Paste Target Checklist. ResolveReview,Long,Encode, orAdjustedlabels before copying the final target value.
Interpreting Results:
Primary Slug is the main normalized value. Use it for the common path segment only after the summary warnings and paste-target rows agree with the destination.
Review does not mean the value is invalid. It means the current option is less typical for that target, such as an underscore in a public URL or Unicode that may be percent-encoded.
Do not treat a unique generated value as proof that the site has no collision. Batch de-duplication catches duplicates in the pasted lines only; it cannot see existing routes, files, or CMS records.
Worked Examples:
Quarterly Launch Plan: APAC Beta with the default settings becomes quarterly-launch-plan-apac-beta. The URL segment and path rows are ready, and the same source also produces anchor, HTML id, CSS class, snake_case, and dot-path variants.
Cafe Partner Roadmap in ASCII-safe mode becomes cafe-partner-roadmap after accent folding. In Unicode mode, a source that contains non-ASCII letters can keep them, and Encoded path shows the percent-encoded form.
A batch with two lines that both normalize to api-status receives numeric suffixes when De-duplicate batch slugs is on, such as api-status and api-status-2. That protects the pasted batch, but live-route collisions still need a separate check.
FAQ:
Are slugs the same as full URLs?
No. The primary slug is usually one path segment. The ledger can show a Path row with a leading slash, but it does not add protocol, host, query, or fragment parts.
Why is my Unicode slug marked Encode?
Character handling set to Unicode can keep non-ASCII letters. Some tools display those characters as percent-encoded text, so the checklist shows the encoded path for review.
Why did extra pasted lines get ignored?
When Batch mode is off, only the first non-blank line is active. Turn Batch mode on to generate one slug per line.
Should stop words always be removed?
No. Use Remove stop words only when the slug stays clear after connector words such as of, for, or the are dropped.
Glossary:
- Slug
- A readable identifier used as a URL segment, anchor, file name, selector, or content key.
- Path segment
- One part of a URL path between slashes.
- Percent-encoding
- A URL-safe representation where reserved or non-ASCII characters may appear as percent followed by hexadecimal digits.
- Stop word
- A short connector word removed only when the remaining slug still carries enough meaning.
References:
- RFC 3986: Uniform Resource Identifier generic syntax, RFC Editor, January 2005.
- Percent-encoding, MDN Web Docs, 2025-11-24.