Buscar herramientas...

Buscar herramientas...

Generador de Slug

Convertir texto a slugs amigables para URLs

How Generador de Slug Works

A Slug Generator is a specialized text manipulator that transforms titles and phrases into a "URL-safe" format. In modern Web Development, slugs are essential for creating SEO-friendly URLs (e.g., tools.com/slug-generator instead of tools.com/page?id=100). A clean slug is more readable for humans and more authoritative for search engine crawlers.

Implementation & Processing Pipeline

The slugification engine follows a rigorous multi-step transformation pipeline:

  1. Unicode Normalization: The tool applies NFD Normalization to decompose accented characters (e.g., é becomes e + ´).
  2. Diacritic Stripping: Accents and marks are removed, leaving only the base Latin characters.
  3. Lowercase Conversion: All characters are transformed to lowercase to ensure consistency across different web servers (many of which are case-sensitive).
  4. Symbol Removal: Non-Alphanumeric characters (punctuation, emojis, etc.) are stripped or replaced with the designated separator.
  5. Separator Application: Spaces and illegal characters are replaced with a "glue" character, typically a hyphen (-) or underscore (_).
  6. Collapsing and Trimming: Multiple consecutive separators are collapsed into one, and any leading/trailing separators are trimmed to ensure a clean string.

The History of Slugs and Permalinks

The term "Slug" originated in the world of News Editing. It was a short name given to an article as it moved through the production process.

  • Django Framework (2005): Popularized the term "SlugField" for database-driven URLs.
  • WordPress (2003): Referred to them as "Permalinks" but used the logic of slugs to turn post titles into links.

Frequently Asked Questions

Google treats hyphens as Word Separators, while underscores are often treated as joining characters. blue-box is seen as "blue" and "box", but blue_box might be seen as "bluebox".