Text to Slug

Convert any text or title into a clean, URL-friendly slug. Handles spaces, special characters, diacritics, and unicode.

Frequently Asked Questions

A URL slug is the human-readable part of a URL that identifies a specific page. For example, in https://example.com/blog/how-to-build-rest-api, the slug is how-to-build-rest-api. Good slugs are lowercase, use hyphens, and contain only letters, numbers, and separators.

URLs are technically case-sensitive (RFC 3986), so /Blog/Post and /blog/post are different URLs. Lowercase slugs avoid duplicate content issues (for SEO) and user confusion when typing URLs manually. Google recommends lowercase URLs.

Diacritics (accented letters like é, ü, ñ) are normalized using Unicode NFD decomposition, which separates base letters from their accent marks. The accent marks are then stripped, leaving the clean base letter — e.g., café becomes cafe.

A slug is the final segment of a URL that identifies a specific page: in /blog/2024/how-to-bake-bread, the slug is how-to-bake-bread. A permalink is the full, permanent URL including the domain, path, and slug: https://example.com/blog/how-to-bake-bread. Slugs are a component of permalinks. WordPress calls its full URL structure a "permalink" but lets you customize the slug portion.

Special characters should be either removed or replaced in slugs. Common replacements: & becomes and; % becomes percent; # is removed; @ is removed. Characters like ?, =, and & are reserved in URLs and will break query string parsing if included literally. This tool automatically removes non-alphanumeric characters and converts & to "and".

There is no official maximum, but shorter slugs are generally better for SEO and usability. Most SEO professionals recommend keeping slugs under 5–6 words and under 75 characters. Very long slugs can push keyword relevance lower and are harder to share or type. Remove stop words (a, the, and, of) to shorten slugs without losing meaning — this tool has a built-in stop word removal option.

Yes. Numbers are valid in slugs and are commonly used for years (/blog/2024/my-post), product IDs (/product/42), and version numbers (/docs/v3). Numbers do not need to be at the beginning or end — they can appear anywhere in the slug. This tool preserves all numeric characters in the output.

Transliteration converts non-Latin characters into Latin equivalents for use in ASCII slugs. For example, the Arabic "مرحبا" might transliterate to "marhaba". This tool handles diacritics (é → e, ü → u) via Unicode NFD normalization, but does not transliterate full non-Latin scripts like Arabic, Chinese, or Cyrillic. For those, server-side libraries like PHP's transliterator_transliterate() or the JavaScript transliteration npm package are needed.

A canonical URL is the preferred URL for a page when multiple URLs could show the same content. Search engines use the <link rel="canonical"> tag to determine which URL to index. Consistent, clean slugs help prevent duplicate content: if you have /blog/My-Post and /blog/my-post, only one should be canonical. Always use lowercase slugs and set up 301 redirects from any alternate URL formats to the canonical one.

Use hyphens. Google treats hyphens as word separators, so red-wine is indexed as two words: "red" and "wine". Underscores are treated as connectors — red_wine is indexed as a single word "red_wine". This means hyphens improve keyword matching in search. The only exception is if your technology stack has a specific requirement for underscores (for example, some Python frameworks use snake_case routing by convention).

About This Slug Converter

This free slug converter transforms any heading or title into a URL-friendly slug by converting to lowercase, replacing spaces with hyphens, and removing special characters. The output follows RFC 3986 URI conventions and handles accented characters (e.g. e-acute to e), punctuation removal, and consecutive-hyphen collapsing.

URL slugs that are clean, lowercase, and hyphen-separated are easier for search engines to read and understand, and more shareable for users.

When to use this tool

  • Generating blog post or article URL slugs from their titles
  • Creating clean file names from arbitrary descriptive strings
  • Building URL-safe identifiers for CMS content or API routes
  • Normalising slugs consistently across a site migration

How It Works

Type a Title

Type or paste any title, headline, or phrase. The slug updates in real time on every keystroke — no button press needed.

Normalize & Strip

Diacritics are decomposed (NFD) and stripped, & becomes and, non-alphanumeric characters are removed, and optional stop words are filtered out.

Copy the Slug

Paste the result directly into your CMS URL field. Choose hyphen or underscore separator, and toggle lowercase and stop-word removal.

Common Use Cases

Blog & CMS URL Slugs

Convert article titles to SEO-friendly URL slugs for WordPress, Ghost, Webflow, or any CMS. Clean, readable URLs improve both rankings and click-through rates.

File & Directory Names

Generate safe file names for assets, images, and documents. Slugified names avoid spaces and special characters that break file systems and URLs.

Database Keys & Identifiers

Create consistent identifiers for tags, categories, and taxonomy terms from human-readable labels, ensuring uniqueness by removing punctuation.

npm & Package Names

Generate valid lowercase package names for npm, Composer, or PyPI from descriptive titles, following the naming conventions of each registry.

CSS Class & ID Names

Turn a component name or section title into a valid, readable kebab-case class or ID. Consistent naming reduces CSS specificity conflicts.

Internationalized Content

Strip diacritics from accented characters in titles (café → cafe, naïve → naive) to generate ASCII-safe slugs for multilingual sites.

Related Articles

View all articles
Slug Collisions: What Happens When Two Pages Generate the Same URL, and How CMSs Handle It

Slug Collisions: What Happens When Two Pages Generate the Same URL, and How CMSs Handle It

Two posts titled "How to Make Sourdough Bread" generate identical slugs by default — and what happens next varies by CMS, from silent numeric suffixes (chocolate-chip-cookies-2) to outright rejection requiring manual resolution. Here's how different collision-handling approaches work, why date/ID-based URL structures avoid most collisions structurally, and the tricky edge case of new content colliding with an old slug's redirect.

Jun 13, 2026
International URL Slugs: Transliteration vs Native Characters for Non-Latin Scripts

International URL Slugs: Transliteration vs Native Characters for Non-Latin Scripts

Chinese, Arabic, and Cyrillic characters in URLs are technically valid and browsers display them readably — but transliteration vs native-language slugs involves real SEO and UX trade-offs. Here's how percent-encoding works, transliteration libraries for different languages, and how major frameworks handle non-ASCII slugs.

Jun 10, 2026
URL Design: Why Your Slug Is a Commitment — and How to Get It Right

URL Design: Why Your Slug Is a Commitment — and How to Get It Right

A URL published today may need to work in 2034. Here's how Wikipedia, the BBC, and GOV.UK approach URL permanence and readability, the SEO costs of changing slugs, and the slug design principles that produce URLs worth keeping.

Jun 9, 2026
Text to Slug Converter — Generate Clean, SEO-Friendly URL Slugs Instantly

Text to Slug Converter — Generate Clean, SEO-Friendly URL Slugs Instantly

Learn what makes a valid URL slug, the transformation process from arbitrary text, whether to remove stop words, why hyphens beat underscores, and how to generate SEO-friendly slugs with a free text-to-slug converter.

Jun 6, 2026