Skip to main content

Text: Slug

Slugify a string: lowercase ASCII letters, strip punctuation and non-ASCII characters, collapse whitespace / underscores / dashes into a single separator, and trim trailing separators.

Example
Separator: "-"
Input: "Hello, World! 2024" → Output: "hello-world-2024"

Separator: "_"
Input: "Étoile du Berger" → Output: "toile_du_berger"

Parameters

Separator

Character inserted between words. Only the first character of the field is used. Defaults to - (URL-style); use _ for snake-case.

Input

StringREQUIRED
Text to slugify.

Output

String
The slugified text.