URL-safe slugs from any input
A slug is the part of a URL that names a page: in example.com/blog/<strong>my-first-post</strong>/, the slug is my-first-post. The generator takes any text and produces that form by stripping anything that is not a letter, digit, underscore, hyphen, or whitespace, then collapsing whitespace to single hyphens and runs of hyphens to one hyphen.
By default the result is forced to lowercase. Toggle Lowercase off to keep the original case (useful when your platform is case-sensitive about slugs and you want My-First-Post). Toggle Per Line on to slugify each line of the input independently; the output then has the same line count as the input, with each line a self-contained slug.
The generator does not transliterate accented characters. café becomes caf because the é is not in the safe set. If you need accent stripping, run the input through a separate transliteration step first, then slugify. Pair this with the Lorem ipsum generator for headlines or the repeat text tool for batched filler.
How to use slug generator
- 1Paste your text into the input panel.
- 2Toggle Lowercase off in the option panel if you want to keep the original case.
- 3Toggle Per Line on if you have a list of titles and want one slug per line.
- 4The output panel shows the slugged result.
- 5Click Copy to grab it for use in URLs, file names, or front-matter.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
What this tool actually does
Strip non-word, non-hyphen, non-whitespace characters
The regex is /[^\w\s-]/g, where \w matches [A-Za-z0-9_]. Punctuation, slashes, parentheses, and Unicode letters outside the basic Latin block are removed.
Collapse whitespace and hyphens
Runs of whitespace become single hyphens (/\s+/g -> -). Then runs of hyphens collapse to one (/-+/g -> -). Leading and trailing whitespace is trimmed.
Lowercase toggle
On by default: every letter in the slug is forced to lowercase before stripping. Off: original case is preserved, so a heading like My Post becomes My-Post instead of my-post.
Per Line toggle
Off (default): the entire input is treated as one string, slug includes hyphens between every word. On: each line is slugified independently; the output has one slug per input line, separated by line breaks.
No transliteration
Accented Latin (é, ñ) and non-Latin characters (Cyrillic, Greek, CJK) are stripped, not converted. café becomes caf. If you need accent stripping, transliterate first.
Worked example
Default mode (per-line off, lowercase on). Punctuation and the ampersand are stripped, line breaks become single hyphens. Toggle Per Line on to get three separate slugs.
Hello, World! The Best Burgers in Town! My Vacation 2026 - Photos & Notes
hello-world-the-best-burgers-in-town-my-vacation-2026-photos-notes
Settings reference
| Option | Effect on output |
|---|---|
Separator = - (default) |
Spaces collapse to dashes. Default URL-style slug. |
Separator = _ |
Spaces collapse to underscores. Common for filenames or DB identifiers. |
Separator = . |
Spaces collapse to dots. Useful for namespaced keys. |
| Separator = none | Spaces are dropped entirely; the slug becomes one camel-style run. |
| Per Line = off (default) | Whole input becomes one slug; line breaks act as whitespace. |
| Per Line = on | Each input line is slugified independently. Output has the same line count as the input. |
| Lowercase = on (default) | Every letter is forced to a-z. |
| Lowercase = off | Original case preserved. Useful when the platform requires case-preserved slugs. |
| Max Length = 0 (default) | No cap. Slug runs as long as the input dictates. |
| Max Length = N | Cap output at N characters; trims at the last separator before the cap so the slug ends on a word boundary, not mid-word. |
| Punctuation | Stripped. Anything outside [A-Za-z0-9_], whitespace, and hyphen is removed. |
| Accented characters | Stripped, not transliterated. café -> caf. |
FAQ
Why does café turn into caf?
[A-Za-z0-9_], whitespace, and hyphen. Accented Latin letters are removed. If you need cafe, transliterate the input first (replace é with e) and then slugify.How do I keep underscores in the slug?
\w. Hyphens also survive. Anything else punctuation-shaped is stripped.