/
[ TEXT STUDIO ]

SEO Slug Generator & Vietnamese Diacritics Normalization

Transform accented unicode text and Vietnamese diacritics into clean, URL-safe, hyphenated slugs for search engine optimization.

UPDATED: 2026-11-06
TIME: 5 min read
FORMAT: GFM // MDX

Search engine algorithms, file system paths, and HTTP routing protocols mandate URL slugs composed strictly of ASCII alphanumeric characters ([a-z0-9]) and safe delimiters (-). Accented international characters and Vietnamese tonal diacritics cause URI encoding explosions (%C3%A0 instead of a), broken URL shares, and impaired SEO ranking.

The SEO Slug & Vietnamese Normalizer strips tonal accents, handles Unicode decomposition, and constructs clean, search-engine-ready slug strings entirely in browser memory.


1. Vietnamese Diacritic Normalization Architecture

The Vietnamese language contains 5 tonal diacritics (sắc, huyền, hỏi, ngã, nặng) and modified vowel graphemes (ă, â, ê, ô, ơ, ư) along with the modified consonant đ/Đ.

Our engine applies a comprehensive dual-pass normalization mapping:

TERMINAL // CODE
[ Input: "Học Lập Trình Next.js Tại Việt Nam" ]
                  │
                  ▼ (Pass 1: Direct Regex Accent Mapping)
[ "Hoc Lap Trinh Next.js Tai Viet Nam" ]
                  │
                  ▼ (Pass 2: Unicode NFD Decomposition)
[ Strips any residual combining diacritical marks \u0300-\u036f ]
                  │
                  ▼ (Pass 3: Special Symbol Scrub & Hyphen Collapse)
[ "hoc-lap-trinh-nextjs-tai-viet-nam" ]

Character Mapping Reference Table:

Vowel / ConsonantAccented VariationsNormalized ASCII Target
Aà, á, ạ, ả, ã, â, ầ, ấ, ậ, ẩ, ẫ, ă, ằ, ắ, ặ, ẳ, ẵa / A
Eè, é, ẹ, ẻ, ẽ, ê, ề, ế, ệ, ể, ễe / E
Iì, í, ị, ỉ, ĩi / I
Oò, ó, ọ, ỏ, õ, ô, ồ, ố, ộ, ổ, ỗ, ơ, ờ, ớ, ợ, ở, ỡo / O
Uù, ú, ụ, ủ, ũ, ư, ừ, ứ, ự, ử, ữu / U
Yỳ, ý, y, ỷ, ỹy / Y
Dđ, Đd / D

Secondary Pass: Unicode Canonical Decomposition (NFD)

To handle decomposed unicode sequences (where a base character and accent mark are stored as two distinct code points), the engine executes:

TERMINAL // CODE
// Primary substitution map
result = result.replace(/[àáạảãâầấậẩẫăằắặẳẵ]/g, "a");
// ... mappings for e, i, o, u, y, d

// Secondary NFD pass removes orphaned combining diacritical marks
result = result.normalize("NFD").replace(/[\u0300-\u036f]/g, "");

NOTE: Normalizing đ to d is crucial: standard Unicode NFD decomposition fails to strip the crossbar on the Vietnamese đ because it is classified as a distinct base consonant rather than a diacritic mark. Our custom substitution map guarantees clean d normalization.


2. Slug Configuration Parameters

  1. Separator Delimiter: Choose between hyphen - (Google SEO recommended standard), underscore _, or period ..
  2. Strip Numbers: Toggle removal of numeric digits (0-9) when creating purely alphabetic routing identifiers.
  3. Remove Special Symbols: Strips punctuation, brackets, currency symbols, and emojis.
  4. Force Lowercase: Converts all output characters to lowercase for uniform HTTP URL paths.

3. Step-by-Step Slug Workflow

TERMINAL // CODE
[ Step 1: Input Title ] ──▶ [ Step 2: Choose Separator ] ──▶ [ Step 3: Copy SEO Slug ]
  1. Paste article titles, product names, or documentation headings into the input canvas.
  2. Select your desired delimiter (hyphen - is selected by default).
  3. The slug generator instantly produces the clean URL string and displays character and word counts.
  4. Click Copy Slug to copy the normalized slug for your CMS or routing config.