Text

Slug Generator

Convert blog titles, page headings, and product names into URL-safe slugs: lowercase, punctuation stripped, spaces replaced with hyphens or underscores. Optional accent folding (café → cafe), & → and, and a max length for CMS fields. Runs entirely in your browser — nothing is uploaded to DroidXP.

Ad placement — top banner

If set, the slug is trimmed at the end and trailing separators are removed.

Ad placement — mid rectangle

What is a URL slug?

A slug is the human-readable part of a URL path, usually derived from a title. Example: /blog/10-tips-for-android-battery-life instead of /post?id=42. Good slugs help readers and search engines understand the page topic. They are typically lowercase, use hyphens between words, and avoid spaces and special characters.

How this generator works

Your text is processed locally in JavaScript. By default we normalize Unicode (NFKD), strip combining accents so “café” can become “cafe”, lowercase everything, replace & with “and” when that option is on, then replace any run of non-alphanumeric characters (or non-letters in Unicode mode) with your chosen separator, collapse duplicate separators, and trim leading/trailing separators. An optional max length truncates from the end.

Hyphens vs underscores

Hyphens are the most common convention for public URLs and blog permalinks. Underscores are sometimes used for file names or internal identifiers. Search engines treat both as word separators; pick one style and stay consistent across your site.

Unicode slugs

With ASCII letters only turned off, letters from many scripts (Cyrillic, Greek, Indic, etc.) are preserved in the slug. Your server, CMS, and CDN must support UTF-8 paths and encoding. For maximum compatibility with older systems, keep ASCII-only on.

How to use this tool

  1. Step 1: Paste a title or several lines (one per slug when “Each line separately” is on).
  2. Step 2: Choose hyphen or underscore, toggle accent folding, & handling, and ASCII-only as needed.
  3. Step 3: Copy the output into your CMS, static site generator, or routing config.
  4. Step 4: Ensure your CMS does not double-encode or strip characters you care about.

Frequently Asked Questions

Does DroidXP upload my titles?

No. Slug generation runs in your browser. Draft text may be stored in localStorage on this device only (see keys below).

Is this the same slug as WordPress or Ghost?

Similar in spirit, but not identical. CMS platforms may apply extra rules (stop words, duplicate handling, percent-encoding). Always verify the final permalink in your CMS after publishing.

Why did my emoji disappear?

Emoji are not treated as letters in the default slug rules; they are removed. If you need emoji in URLs (rare), build the path manually.

What localStorage keys does this tool use?

Keys are prefixed with droidxp-sg-: input text, per-line mode, separator, transliteration, ampersand, ASCII-only, and max length. Clear removes them.

Can two different titles produce the same slug?

Yes. Collisions are common after removing punctuation and accents. Your CMS should detect duplicates and append -2, -3, etc., or you should add a unique id.

Should I use a slug for file names?

Often yes, for predictable, portable names. Avoid reserved characters and reserved Windows file names (CON, PRN, etc.) when saving files.

Does max length break words in the middle?

It truncates the character count at the end, then trims trailing separators. It does not insert word boundaries — shorten manually if you need a cleaner cut.

Is this safe for API keys or sensitive titles?

Follow your security policy. Nothing is sent to DroidXP, but shared screens, extensions, and localStorage backups can still expose content.

Why is “and” in the middle of my slug?

When “Turn & into ‘and’” is enabled, the & character is replaced with the word “and” before separators are applied, so spaces become hyphens.

Can I use this offline?

After the first load, the page can work offline if cached. Slug logic does not require a network.