WordPress slug generator
WordPress · URL-friendlyPaste a title and get the optimised slug: lowercase, hyphens instead of spaces, accented characters correctly converted. Full URL preview with domain and multilingual support.
// 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 ), ] );
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.