Slug Generator
Convert any text to a URL-safe slug. Indonesian transliteration, custom separator, lowercase, max length. Live preview. 100% offline.
About this tool
Convert article titles, product names, and free-form text into URL-safe slugs. Type or paste into the input and the slug updates live in the preview card below. Tweak the separator (default is a hyphen, but you can switch to underscore, dot, or anything else), enforce lowercase, and set a max length to truncate long titles. The tool has a built-in transliteration table for Indonesian and Western European accented characters — "Halo Dunia!" becomes "halo-dunia", "Café Jakarta" becomes "cafe-jakarta", "Año Nuevo" becomes "ano-nuevo". Characters that don't transliterate are simply removed. Useful for blog post URLs, file names, branch names, and any time you need a clean human-readable identifier.
Details
- Category
- text
- Version
- 1.0.0
- Size
- 11 KB
- Updated
- Jun 2026
Frequently Asked Questions
What is a slug?
A slug is the URL-friendly version of a title or name. It uses only lowercase letters, digits, and hyphens (or another chosen separator). For example, the article "10 Tips for Better Sleep!" becomes the slug "10-tips-for-better-sleep". Slugs are common in blog post URLs, file names, and database lookups.
What characters get removed?
Anything that is not a letter, digit, separator, or in the transliteration table. Punctuation (! ? . , ; :), symbols (@ # $ %), emoji, and characters from non-Latin scripts that don't transliterate (CJK, Cyrillic, Arabic, etc.) are dropped. Numbers are kept. Spaces are converted to the separator.
Does it handle Indonesian accented characters?
For common cases — yes. The built-in table covers é→e, è→e, ñ→n, ü→u, å→a, ç→c, and similar Latin-1 supplement characters. For non-Latin scripts (Chinese, Japanese, Korean, Arabic, Cyrillic) the tool falls back to removing the character. If you need custom transliteration for a specific language, edit the table in the source — it is intentionally a simple map.
Why limit max length?
Some platforms truncate long URLs anyway, and shorter slugs are easier to share. 50–60 characters is a good practical ceiling. The tool cuts the slug at the last whole word before the limit to avoid orphaned characters like "-th" at the end.
Is my data private?
Yes. Slug generation is fully client-side JavaScript. The input field keeps no state between visits — refresh the page and the tool starts fresh. Nothing is logged, sent, or saved.