Text utilities
Create a clean URL slug
Start from the title, normalize text, remove noise, keep important words, and avoid changing the slug after publishing.
Goal: Turn a page title or heading into a reliable URL path segment.
Workflow steps
Step 1
Start with the final title
Slugs should match the page topic. Avoid generating a slug from a temporary draft title.
Step 2
Normalize and hyphenate
Lowercase the text, remove extra punctuation, normalize accents, and join words with hyphens.
Step 3
Keep it stable
Changing published slugs creates broken links unless redirects are added.
Step 4
Review for privacy
Do not put user emails, tokens, private IDs, or sensitive data in URLs.
Real examples
Title
How to Format JSON OnlineSlug
how-to-format-json-onlineCommon pitfalls
Making slugs too long.
Changing slugs after indexing.
Leaving private identifiers in public URLs.