Skip to main content
Text ToolsAugust 24, 2026 · 2 min read

How to Generate a URL Slug From a Title (Including Vietnamese)

Turn any title into a clean, URL-safe slug — with correct handling of Vietnamese diacritics, including 'đ,' which isn't just an accented 'd.'

By QR Ivify Team

How to Generate a URL Slug From a Title (Including Vietnamese)

A blog post title, a product name, a page heading — turning it into a clean URL slug (my-blog-post-title instead of My Blog Post Title!) is something every CMS does automatically, until you need to generate one manually, or the automatic version mangles non-English text. Here's how slug generation actually works, and where it commonly goes wrong.

What Makes a Slug "Clean"

A URL-safe slug is lowercase, uses only letters, numbers, and a single separator character (usually a hyphen), and has no repeated or trailing separators. Getting from "Hello, World! This Is a Title." to hello-world-this-is-a-title means: lowercase everything, replace every run of non-alphanumeric characters with the separator, and trim any separator left dangling at the start or end.

The Vietnamese Problem

This is where a lot of slug generators quietly fail. Standard accent-stripping works by decomposing a character like "à" into its base letter ("a") plus a separate "combining accent mark," then dropping the accent mark — leaving "a." That works for most diacritics. It does not work for "đ" (and its uppercase "Đ"), because in Vietnamese, đ is its own distinct letter, not a "d" with an accent mark attached. Standard decomposition leaves đ completely untouched, and a slug generator that doesn't handle it explicitly ends up either keeping the raw đ character in the slug (breaking URL-safety) or dropping it as an unrecognized character (losing content).

QR Ivify's Slug Generator handles đ/Đ explicitly, converting them to d/D before the rest of the accent-stripping runs — so Vietnamese titles produce a correct, readable slug instead of a broken or lossy one.

Step by Step

  1. Open the Slug Generator.
  2. Type or paste a title.
  3. Choose a hyphen or underscore as the separator.
  4. The slug updates live — copy it once it looks right.

A Worked Example

Input: Xin chào các bạn! Đây là 100% Test.

Output: xin-chao-cac-ban-day-la-100-test

Every Vietnamese diacritic is stripped to its base Latin letter, "Đây" correctly becomes "day" (not "ây" or a broken character), the percent sign and punctuation become separators, and the whole thing collapses to one clean, readable slug.

Frequently Asked Questions

Does this handle Vietnamese titles correctly? Yes — Vietnamese diacritics (including "đ," which isn't just an accented "d") are correctly transliterated to plain ASCII letters rather than dropped or garbled.

Can I use an underscore instead of a hyphen? Yes — hyphens are the more common convention for URLs, but underscores are supported too.

What happens to numbers? Numbers are kept as-is — only letters and numbers survive; everything else becomes a separator.

Does this upload my text anywhere? No. The slug is generated entirely in your browser.

Try It

Need a clean URL slug from a title — including one with Vietnamese text? QR Ivify's free Slug Generator handles diacritics correctly. Need the title's word count for an SEO check too? Try Word Counter.

slug generatortext toolstutorial

Related articles