Slug Generator

Convert text to a URL-safe slug with a chosen separator.

  • Runs locally in your browser
  • No upload required

Try it

Processed entirely in your browser; nothing is uploaded.

Slug
hello-world
Words
2

Supported formats

Input
text, select, boolean
Output
text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

Produced a 11 character(s) slug from 2 word(s).

How it works

  • Normalised the text with Unicode NFKD.
  • Removed combining marks so Latin diacritics become their base letters.
  • Lower-cased the text.
  • Replaced every run of non-alphanumeric characters with "-".
  • Trimmed leading and trailing separators.
textSelect to copy
words.join(separator)
  • Only Unicode letters and numbers survive; other characters become the separator.
  • The transform is idempotent: running it on its own output changes nothing.

Methodology

  1. Normalise to NFKD and strip combining marks to transliterate Latin accents.
  2. Optionally lower-case the text.
  3. Split on non-alphanumeric runs and join the surviving words with the separator.
  4. Trim leading and trailing separators.

Usage

  1. Paste or type the text to convert.
  2. Choose the separator and whether to lower-case.
  3. Run the tool and copy the generated slug.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

Basic title

jsonSelect to copy
{
  "text": "Hello, World!",
  "separator": "-",
  "lowercase": true
}

Accents transliterated

jsonSelect to copy
{
  "text": "Café au lait",
  "separator": "-",
  "lowercase": true
}

Underscore separator

jsonSelect to copy
{
  "text": "Max retry count",
  "separator": "_",
  "lowercase": true
}

Limitations

Where slugs are used

A slug is the human-readable part of a URL. Keeping it lower-case, ASCII where possible and separated by hyphens is the common convention for stable, legible links.

Frequently asked questions

Which characters are removed?
Every run of characters that is not a Unicode letter or number becomes one separator. Leading and trailing separators are trimmed.
Does the generator resolve duplicate slugs?
No. It produces the slug for the text you give it; the host application decides how to make slugs unique.

Sources

  1. RFC 3986: Uniform Resource Identifier (URI): Generic Syntax — IETF
  2. Unicode Standard Annex #15: Unicode Normalization Forms — Unicode Consortium