WordPress slug generator

WordPress · URL-friendly

Paste a title and get the optimised slug: lowercase, hyphens instead of spaces, accented characters correctly converted. Full URL preview with domain and multilingual support.

Title → slug
WordPress URL preview
https://yoursite.com/
Docs & PHP
WordPress slug rules
Use lowercase — WordPress normalizes slugs to lowercase.
Spaces and special characters → hyphen -. Avoid underscores in public URLs.
Common accented letters are transliterated to ASCII (à→a, é→e, etc.).
Aim for 3–5 words and under ~60 characters when possible.
Place the main keyword as early as you can in the slug.
PHP — sanitize_title()
// WordPress does this automatically;
// you can force it in functions.php

sanitize_title( 'Page title' );
// → "page-title"

// Slug in WP_Query:
$args = [
  'name' => sanitize_title( $slug ),
  'post_type' => 'page',
];

// Update a post slug:
wp_update_post( [
  'ID'         => $post_id,
  'post_name' => sanitize_title( $title ),
] );
Accents & symbols → ASCII
à á â ã ä å→ a
è é ê ë→ e
ì í î ï→ i
ò ó ô õ ö ø→ o
ù ú û ü→ u
ñ ç ß æ→ n, c, ss, ae
' " ( ) [ ]removed
space / _ + .→ -
repeated --→ single -

The slug is the final part of a WordPress page URL and has a direct impact on SEO ranking: it should be short, descriptive, free of unnecessary stop words and written in lowercase with hyphens as separators. For non-English sites, handling accented characters and special symbols is a step that often introduces errors.

This generator lets you:

  • Convert any text into a valid WordPress slug
  • Automatically transform accented letters into ASCII equivalents
  • Remove characters not allowed in URLs and normalise separators
  • Preview the full URL with your domain
  • Handle multilingual slugs for Polylang sites

Slug best practices

WordPress runs sanitize_title() when you edit posts and pages; this tool previews similar behaviour. For SEO, prefer short slugs (about 3–5 words, under ~60 characters), put the main keyword early, and use hyphens instead of underscores.