Générateur de slug en ligne
Générateur de slug transforme un titre, un nom de produit ou une phrase en slug compatible avec les URL. Choisissez le séparateur, décidez de conserver ou non la casse d'origine, et copiez le résultat. La conversion s'exécute côté serveur et accepte jusqu'à 20 000 caractères.
Utilisation Générateur de slug en ligne
Lire le contenu
What this page does
A slug is the readable part of a URL that identifies a page, such as /best-running-shoes instead of /product/18273. This page takes your text, removes or replaces the characters that do not belong in a URL and joins the remaining words with a separator you choose. The result appears in the result box and can be copied with one click.
The conversion happens on the server. The page sends your text to an endpoint, receives the slug and displays it. There is no live preview while you type, so press Generate Slug when the text and options are ready.
Lowercase and original case
The Lowercase checkbox is on by default, and that is the mode most sites should use. In this mode the server passes the text through Laravel's slug helper, which transliterates characters to ASCII, lowercases the words and replaces runs of separators with a single separator.
When you clear the checkbox, the server uses a different rule: it keeps Unicode letters and digits as they are and replaces every run of other characters with the separator. That preserves capital letters and accents, so "Café Menu" can become "Café-Menu" rather than "cafe-menu". The trade-off is that the result may contain characters that need percent-encoding in a URL, and two slugs that differ only by case may be treated as the same page by some servers.
What happens to punctuation and symbols
Spaces, slashes, question marks, ampersands, brackets and most punctuation become the separator, and repeated separators collapse into one. Leading and trailing separators are removed. Letters with accents are transliterated in lowercase mode, so é becomes e and ü becomes u. Emoji and symbols that have no transliteration are generally dropped.
Scripts without a Latin mapping are the main risk. If the whole title is written in a script the transliterator cannot convert, the lowercase slug can come back empty or much shorter than expected. Test a representative title before relying on the tool for a multilingual site, and consider adding a manual Latin transliteration for those pages.
Choosing a separator
The separator field accepts up to two characters in the interface, but the page uses only the first character. Typing two dashes therefore behaves exactly like one dash. If the field is empty, the page falls back to a hyphen.
A hyphen is the safest choice. Underscores are common in analytics and file names, but search engines treat hyphens as word separators more consistently. A dot or a slash is technically possible, but a slash creates extra path segments and a dot can be confused with a file extension. Avoid letters and digits as separators: a slug such as wordxword is ambiguous to read and to parse.
What makes a good slug
A good slug is short, descriptive and stable. It should tell a person what the page is about before they click, and it should still make sense if the page title changes slightly. Use the main keyword once, drop filler words, and keep the order natural. Lowercase letters and hyphens are the convention for a reason: they are easy to read, easy to type and unlikely to be mangled by a chat app or an email client.
Stability matters more than perfection. Once a URL is indexed, shared or printed, changing the slug breaks those links unless you add a redirect. Decide the slug before publishing, and if you must change it later, keep the old URL alive with a permanent redirect.
Examples
- "10 Best Running Shoes for Flat Feet" becomes 10-best-running-shoes-for-flat-feet.
- "Café & Bakery — Paris" becomes cafe-bakery-paris in lowercase mode.
- "Product #42: Blue / Large" becomes product-42-blue-large.
- "Hello, World!" becomes hello-world.
- An empty or all-symbol input produces an empty result or an error, because there is nothing left to slug.
These examples assume the default hyphen and lowercase mode. A different separator changes the joins, and original-case mode keeps the capital letters.
Step by step
- Paste or type the title into the text box.
- Leave the separator as a hyphen unless your project has a different convention.
- Leave Lowercase checked for a normal public URL.
- Press Generate Slug.
- Read the result and check that no word was lost or joined unexpectedly.
- Press Copy and paste the slug into your CMS, route or redirect rule.
How long should a slug be
Trois à six mots significatifs suffisent généralement. Un slug court est plus facile à lire, plus facile à prononcer et moins susceptible d'être tronqué dans un résultat de recherche ou un aperçu de message. Supprimez les articles, les conjonctions et les mots de remplissage qui allongent sans apporter de sens. Conservez le numéro d'une liste si le numéro fait partie de la promesse, comme 10-best-running-shoes, mais évitez les dates, les identifiants internes et les numéros de version, sauf si la page y est réellement liée.
Modifier un slug après publication
Si la page est déjà en ligne, un nouveau slug signifie une nouvelle URL. Ajoutez une redirection permanente de l'ancien chemin vers le nouveau, mettez à jour les liens internes, soumettez l'URL modifiée dans votre sitemap et vérifiez les statistiques pour l'ancienne entrée. Sans redirection, chaque lien existant, favori et résultat de recherche pointe vers une page morte. Si la page n'a aucun trafic et a été publiée il y a quelques minutes, un changement propre est acceptable ; sinon, considérez la redirection comme faisant partie du changement, et non comme une réflexion après coup.
Limites
L'entrée est limitée à 20 000 caractères côté serveur. La page n'affiche pas de compteur, donc un document très long échouera à la validation au lieu de produire un slug partiel. Il n'y a pas de mode de traitement par lots, pas d'historique et pas de téléchargement ; le résultat est une chaîne unique. Si la requête échoue, la page affiche un court message d'erreur plutôt que la raison détaillée de l'échec de validation.
L'outil ne vérifie pas si le slug est déjà utilisé sur votre site. L'unicité est de votre responsabilité. Il n'ajoute, ne supprime et ne réécrit pas non plus les mots vides au-delà des règles de caractères décrites ci-dessus.
Erreurs courantes
Ne collez pas un article entier en espérant obtenir un slug utile ; le résultat sera une très longue chaîne. N'utilisez pas de slugs en majuscules, sauf si votre routeur est insensible à la casse. Ne modifiez pas un slug en ligne sans redirection. Et ne partez pas du principe qu'un titre non latin sera translittéré parfaitement ; vérifiez le résultat avant d'enregistrer la page.
Confidentialité
Le texte est envoyé au serveur pour conversion et renvoyé dans la réponse. L'outil ne le stocke pas. Évitez de coller du matériel confidentiel dans un convertisseur en ligne, y compris celui-ci, si votre politique ne l'autorise pas.
Foire aux questions
FAQ
Suggested Tools
Commentaires (0)
Décrivez le problème que vous avez rencontré afin que nous puissions l'examiner et améliorer l'outil.