inyourbrowser.com

Slug generator

Slug generator is a developer tool that turns any text into a URL-safe slug. It normalises Unicode, strips diacritics, removes punctuation, and joins words with a separator of your choice. The tool runs in your browser.

Input (one title per line)
Output slugs
5 slugs

SEPARATOR

OPTIONS

Runs entirely in your browser

How to generate URL slugs

  1. Paste one title per line into the input pane.
  2. Choose the separator: hyphen or underscore.
  3. Toggle lowercase and strip-diacritics to taste.
  4. Set the maximum length, then copy the generated slugs.

Common uses

  • Generating clean URLs for blog posts, articles, and product pages
  • Producing file names that work the same on every operating system
  • Building stable identifiers for migration scripts and seed data
  • Normalising imported titles with help from case converter for consistent results

Technical specification

  • Algorithm or formula: Unicode NFKD normalisation via String.prototype.normalize("NFKD"), followed by a combining-mark stripping regex (/\p{Diacritic}/gu), lowercasing, and a non-word-character regex collapse to the chosen separator.
  • Browser API or library: Native String.prototype.normalize, regular expressions with Unicode property escapes (/u flag). No external library.
  • Input limits: No hard cap; bulk mode handles thousands of lines comfortably.
  • Output: Single slug or one slug per line, with options for separator (hyphen, underscore), lowercase, strip diacritics, and max length.
  • Known limitations: Non-Latin scripts that have no canonical decomposition (e.g., Chinese, Japanese, Arabic) are passed through as-is rather than transliterated.

Frequently asked questions

What is a URL slug, and what characters does this tool keep?
A URL slug is the readable part of a web address that identifies a page, like 'my-first-post'. This generator keeps lowercase letters, digits, and the separator (hyphen by default), while diacritics are normalised to base letters and all other punctuation is stripped. All processing runs in your browser.
Is my text sent to a server?
All slug generation runs in your browser using built-in string methods. Our servers are not involved at any point.
How does the generator handle accented characters?
Characters with diacritics are normalised to their base letter using Unicode NFKD normalisation. Toggle the strip-diacritics option in the side panel to control this.
Can I switch between hyphen and underscore separators?
Yes. The separator toggle in the side panel re-generates every slug instantly with the chosen character.
How do I generate many slugs at once?
Paste one title per line. Each line becomes a slug in the output area, ready to copy in bulk.
Will the generator preserve uppercase letters?
Slugs are lower-cased by default for portability. Disable the lowercase toggle to keep the original casing in the output.

Reviewed and tested May 26, 2026.