Skip to main content

Text to URL Slug Converter

Turn any title or phrase into a URL-safe slug

Separator:
0 characters
Processed locally
Zero server requests
Works offline
Nothing leaves your device

Why use Text to Slug Converter

  • Transliterates accented characters (e, n, u, o) to ASCII instead of percent-encoding them.
  • Three separator options cover SEO, code, and filename conventions.
  • Collapses multiple spaces and strips leading/trailing separators so you never get double-hyphens.

How it works

The algorithm lowercases the input, applies Unicode NFD decomposition to split accented characters into base letter + combining mark, strips the combining marks via regex (\u0300-\u036f), replaces non-alphanumeric characters with the chosen separator, collapses consecutive separators, and trims leading/trailing separators. The result is a URL-safe string containing only lowercase letters, digits, and the selected separator.

About this tool

Paste a blog post title like "The 10 Best Coffee Shops in Sao Paulo (2025)" and get back 10-best-coffee-shops-sao-paulo-2025 -- a clean, lowercase, hyphenated slug for a URL, filename, or database key. Accented characters are transliterated to ASCII (cafe from cafe, uber from uber). CJK characters with no ASCII equivalent are removed. Multiple spaces collapse to a single separator, and leading or trailing separators are stripped. Three separator options cover the main conventions. Hyphens are the SEO standard because Google treats them as word separators. Underscores are common in Python and database columns. Dots suit filename workflows. A live character count keeps slugs under 60 characters, the point where Google starts truncating page titles in search results. WordPress auto-generates slugs, but they tend to include stop words and run long. Pasting the title here first gives you a clean version to drop into the URL field before publishing.

How to use Text to Slug Converter

  1. Paste your title or phrase. Drop any heading, product name, or sentence into the input field. The slug appears instantly as you type.
  2. Pick a separator. Hyphen (-) for public URLs and SEO. Underscore (_) for database columns and Python identifiers. Dot (.) for filenames.
  3. Review and trim. Check the output. Accented characters are transliterated, multiple spaces collapse, and the character count shows slug length. Aim for under 60 characters.
  4. Copy. Click Copy and paste the slug into your CMS URL field, code, or schema.

Use cases

  • Replacing WordPress's auto-generated slug with a shorter, keyword-focused version before publishing.
  • Converting a spreadsheet of product names into URL-safe slugs before importing into a headless CMS.

Frequently Asked Questions

The human-readable part of a URL that identifies a page. In 'example.com/blog/how-to-make-coffee', the slug is 'how-to-make-coffee'. Slugs are lowercase, hyphenated, and contain only URL-safe characters.

Google recommends hyphens. It treats a hyphen as a word separator, so 'red-shoes' indexes as two words. Underscores are treated as joiners, making 'red_shoes' a single token. For public-facing URLs, hyphens are almost always the right call.

Accented Latin characters are transliterated to their ASCII equivalents: 'é' → 'e', 'ñ' → 'n', 'ü' → 'u', 'ø' → 'o'. This is done using Unicode normalization (NFD decomposition) followed by stripping combining diacritical marks. CJK characters and other non-Latin scripts that have no ASCII equivalent are removed. This keeps slugs clean and universally readable in any URL.

Keep slugs concise -ideally under 60 characters. Google truncates page titles in search results around 60 characters, and shorter URLs are easier to share, type, and remember. Drop stop words like 'a', 'the', 'and', 'of' from your slug. For example, 'the-best-coffee-shops-in-the-city' becomes 'best-coffee-shops-city'.

Generally no. Removing stop words keeps slugs shorter and focuses the URL on meaningful keywords. 'the-best-coffee-shops-in-the-city' is better as 'best-coffee-shops-city'. Google recommends keeping URLs concise. That said, some CMS platforms auto-generate slugs with stop words included -consistency within your site matters more than removing every stop word.

Numbers pass through unchanged -'10 best tools' becomes '10-best-tools'. This is correct behavior. Date strings like '2025-01-15' remain as-is when hyphens are selected because the hyphens are already the right separator. Including a year in a slug (e.g. 'best-laptops-2025') is common practice and helps with time-sensitive search queries.

Partially. Accented Latin characters (French, Spanish, German, Portuguese, Scandinavian) are transliterated to their ASCII equivalents. CJK characters (Chinese, Japanese, Korean), Arabic, Cyrillic, and other non-Latin scripts have no ASCII equivalent and are removed. For non-Latin content, you typically need a language-specific romanization library rather than a generic slugify function.