ToolHarbor

Slug Generator

Generate clean, URL-friendly slugs from any text. Supports custom separators, max length, and accent transliteration.

Features

  • Convert any text to a URL-friendly slug instantly
  • Choose between hyphen, underscore, or dot separators
  • Transliterates accented characters (é → e, ñ → n, ü → u)
  • Optional max length with clean truncation
  • Supports multi-line input for batch slug generation
  • Copy results with one click

How to Use

  1. 1Type or paste your text in the input field
  2. 2Choose a separator style (hyphen, underscore, or dot)
  3. 3Optionally set a max length to keep slugs short
  4. 4The slug appears instantly in the output field
  5. 5Copy the result using the Copy button

Examples

Blog post title

Input

How to Build a REST API with Node.js

Output

how-to-build-a-rest-api-with-node-js
Accented characters

Input

Café résumé naïve

Output

cafe-resume-naive
Special characters removed

Input

What's New in TypeScript 5.0?

Output

whats-new-in-typescript-5-0
Underscore separator

Input

user profile settings

Output

user_profile_settings

What Is a URL Slug?

A URL slug is the human-readable part of a web address that identifies a specific page. For example, in the URL "example.com/blog/how-to-use-git", the slug is "how-to-use-git". Slugs are important for both SEO and user experience — a clean, descriptive slug helps search engines understand what a page is about and helps users know what to expect before clicking.

Good slugs are lowercase, use hyphens to separate words, and contain only alphanumeric characters. Special characters, spaces, and accented letters need to be removed or converted. This tool handles all of that automatically: it strips punctuation, transliterates accents (so "café" becomes "cafe"), collapses multiple spaces, and joins words with your chosen separator.

The hyphen (-) is the most common separator for URL slugs and is recommended by Google. Underscores (_) are sometimes used for file names, database identifiers, and internal references. Dots (.) are less common but used in some package naming conventions. This tool lets you pick whichever format your project requires.

The optional max length setting is useful when slugs need to fit a database column limit or when you want to keep URLs concise. The truncation is clean — it never cuts a word in half or leaves a trailing separator. Multi-line input lets you batch-generate slugs for an entire list of titles or headings at once.

Everything runs in your browser. Your text is never sent to a server. Whether you are building a blog, an e-commerce store, or a documentation site, this slug generator gives you consistent, SEO-friendly URLs in seconds.

Frequently Asked Questions

Related Tools