ToolConvoyToolConvoyv2.6
TEXT

Text to Slug — Convert Text to URL-Friendly Slugs

Convert any text to a URL-friendly slug. Lowercase, hyphen-separated, stripped of special characters — ideal for CMS permalinks, filenames, and IDs.

● LOCAL · CLIPBOARD-FRIENDLY0 network requests from tools since page load

Text to Slug

Convert text to URL-friendly slugs. Works entirely in your browser.

A slug is the human-readable portion of a URL that identifies a specific page. The word comes from newspaper publishing, where a slug was a short name given to an article during the editing process — something a typesetter could grab and place on the page quickly. On the web, the slug is the last segment of the path: example.com/blog/how-to-bake-bread. Every content management system, every static site generator, and every blogging platform generates slugs from titles, and every developer has at some point hand-crafted a slug by lowercasing the title, replacing spaces with hyphens, and stripping the punctuation that breaks URLs.

The Text-to-Slug tool automates that process with the standard rules that the web has converged on: lowercase, hyphens as word separators, strip everything that is not a letter or digit. The transliteration step handles accented characters correctly — decomposing the Unicode and removing the diacritic — so a title like “José’s Café” becomes “joses-cafe”. The options for maximum length, stop-word removal, and custom separators cover the rules that different platforms impose: WordPress truncates at 200 characters, some static site generators use underscores instead of hyphens, and SEO guidelines recommend removing filler words. The output is paste-ready for any CMS, any URL bar, and any file system.

Advertisement

How to use

  1. Enter your text

    Type or paste the title, headline, or phrase. The slug updates as you type — the output is lowercase with spaces replaced by hyphens and non-alphanumeric characters stripped.

  2. Adjust the slug options

    Toggle options for maximum length (trim to N characters at a word boundary), stop-word removal (strip common words like 'the', 'a', 'and'), and custom separator character (hyphen, underscore, or period).

  3. Copy the slug

    Copy the generated slug to your clipboard. It is ready for use as a URL path segment, a filename, an HTML id attribute, or a database key.

Frequently asked

What characters are allowed in a slug?

By default, lowercase letters (a-z), digits (0-9), and hyphens. All other characters are transliterated (accented letters to their ASCII base), removed, or replaced. The output is safe for URLs, filenames on any operating system, and database identifiers.

How does transliteration work for accented characters?

Characters with diacritical marks are decomposed into their base letter plus the diacritic (using Unicode Normalisation Form D), and the diacritic is removed. é becomes e, ñ becomes n, ü becomes u. Characters without a natural ASCII mapping (Greek, Cyrillic, CJK) are stripped unless 'allow Unicode' is enabled.

Can I keep certain special characters?

Toggle 'allow Unicode' to preserve non-ASCII letters in the output — useful for multilingual sites where slugs should retain the original script. When enabled, the output is still URL-safe (percent-encoded by the browser as needed) but may not be compatible with legacy file systems.

What is the purpose of removing stop words?

Stop words — 'the', 'a', 'an', 'is', 'of', 'and' — add length without adding meaning. Removing them produces shorter, more readable slugs. The option is useful for blog post URLs where the title is long and the slug should capture only the meaningful words.

Limitations

  • No duplicate-slug detectionThe tool generates a single slug from the input. It does not check a database or file system for existing slugs. Append a number or date prefix for uniqueness if the slug will be used in a CMS where collisions are possible.
  • No language-specific stop-word listsThe stop-word list is English only. For slugs in other languages, either disable stop-word removal or pre-process the text to remove the stop words manually before conversion.
  • Short output may be ambiguousWith aggressive length limits and stop-word removal enabled, very short slugs (under 15 characters) may lose enough meaning to be ambiguous. Review the slug before using it as a permanent identifier.

Platform notes

macOS
The terminal equivalent is `echo 'My Title' | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | tr -s '-'`. The browser tool adds transliteration, stop-word removal, and length trimming in one step.
Linux
`slugify` is a common npm package for this task. The browser tool avoids installing a package and gives visual feedback on the slug as you adjust options.
Web
Runs entirely in the browser. Text is processed locally and never uploaded — useful for generating slugs for unreleased content.
Advertisement
Advertisement