DevTools Logo

Slug Generator

Slug Generator

Convert any text into URL-friendly slugs for clean URLs and permalinks

Input Text

Enter the text you want to convert to a slug

Examples

Generate a basic slug

Input
Hello, World!
Output
hello-world

Default settings lowercase the text, remove punctuation, and replace the space with a hyphen.

Transliterate Turkish characters

Input
Çeşitli Ürünler İndirimde
Output
cesitli-urunler-indirimde

The built-in Turkish character handling converts the title to an ASCII slug under the default settings.

Apply a hard maximum length

Input
Readable Slugs Can Be Truncated
Max length: 20
Output
readable-slugs-can-b

The generator takes the first 20 characters of the completed slug, even though that cuts through the word 'be'.

About this tool

Slug Generator turns a title into a URL path segment with a small custom transliteration and regular-expression pipeline. Lowercasing is enabled by default, selected Turkish and Western European characters are mapped to ASCII, unsupported punctuation and non-word characters are removed, whitespace runs become the selected separator, and hyphen runs are replaced with that separator.

The separator can be a hyphen, underscore, or period. An optional fixed list removes common English and Turkish stop words, and an optional maximum length truncates the completed slug by character count. Truncation removes trailing hyphens but does not search for a word boundary, so it can cut through a word.

The output updates while you type and includes character and separator-delimited word counts plus a preview under example.com. The transformation is intentionally limited rather than language-aware: scripts outside the explicit maps are removed by the ASCII-oriented word-character filter, existing underscores are preserved, and leading or trailing hyphens are not stripped.

How to use

  1. Enter the source text

    Type or paste a title, heading, or label. The slug and URL preview update immediately.

  2. Choose case and stop-word behavior

    Keep lowercase enabled for the default URL style, optionally preserve case, and enable stop-word removal only when the fixed English and Turkish list matches your needs.

  3. Set the separator and length

    Choose hyphen, underscore, or period, then optionally enter a maximum character count. Inspect the result because the limit can truncate a word.

  4. Review and copy

    Check transliteration, punctuation removal, boundaries, character count, and URL preview, then copy the generated slug.

Use cases

Creating article permalinks

Convert a blog-post or documentation title into a lowercase path segment for a clean URL.

Normalizing CMS identifiers

Produce consistent slugs for pages, categories, tags, or other content records before saving them.

Transliterating supported Latin text

Convert the tool's supported Turkish and Western European characters into simple ASCII forms.

Meeting path-length constraints

Apply a fixed maximum character count when a destination system limits identifier or URL-segment length.

Common mistakes

Mistake:Assuming all non-ASCII languages are transliterated.

Fix:The tool only maps an explicit set of Turkish and Western European characters; other scripts and unsupported characters are removed. Review the result or use a language-aware transliterator when needed.

Mistake:Assuming leading and trailing hyphens are always removed.

Fix:The pipeline trims whitespace, not boundary hyphens. Remove unwanted leading or trailing separators from the source or edit the result before using it.

Mistake:Expecting every run of the selected separator to be collapsed.

Fix:Whitespace runs are replaced once and hyphen runs are normalized, but existing underscores are word characters and remain untouched. Inspect custom-separator output for repeated separators.

Mistake:Using max length with the expectation that the last complete word is preserved.

Fix:The limit uses substring truncation and can stop mid-word. Increase the limit or shorten the source text manually when whole-word slugs are required.

Frequently asked questions

References & standards