Slug / URL Generator

Generate URL-safe slugs from any text. Convert titles to clean, SEO-friendly URLs. Supports hyphens, underscores, camelCase, and constants. Free online tool.

Your data never leaves your browser Available via MCP

How to Use

  1. Enter a title, heading, or phrase in the input area.
  2. Select a style: URL Slug, Filename, Variable, or Constant.
  3. Optionally change the separator (hyphen, underscore, or dot).
  4. Copy the generated slug from the output panel.

Best Practices for URL Slugs

  • Keep it short — Aim for 3–5 words. Remove filler words like "the," "and," "a," "is."
  • Use hyphens — Google treats hyphens as word separators but underscores do not separate words for SEO purposes.
  • Lowercase only — Mixed-case URLs can cause duplicate content issues on case-sensitive servers.
  • Include keywords — Put your primary keyword in the slug for SEO benefit.
  • Avoid dates — Unless content is time-sensitive, dates in URLs make content appear outdated.
  • No special characters — Stick to letters, numbers, and hyphens for maximum compatibility.

Slugs in Popular Frameworks

Most web frameworks have built-in slug utilities. Django uses slugify(), Rails has parameterize(), and WordPress auto-generates slugs from post titles. This tool replicates that behavior so you can preview and customize slugs before creating content.

Related Tools

Convert text case with the Text Case Converter. Encode URL parameters with the URL Encoder. Count words in your content with the Word Counter. Generate QR codes from URLs with the QR Code Generator. Preview Markdown content with the Markdown Preview.

Frequently Asked Questions

What is a URL slug?
A URL slug is the part of a URL that identifies a page in human-readable form. For example, in "example.com/my-blog-post", the slug is "my-blog-post". Good slugs are lowercase, use hyphens as separators, and contain only letters, numbers, and hyphens.
Why are slugs important for SEO?
Search engines use URL slugs as a ranking signal. Descriptive slugs that contain target keywords help search engines understand page content. Short, clean URLs also get higher click-through rates in search results compared to long, cryptic URLs.
How are special characters handled?
The generator removes diacritics (accented characters like é become e), strips all non-alphanumeric characters, and converts spaces to the chosen separator. Unicode normalization ensures consistent handling across languages.
What is the difference between URL Slug and Filename modes?
URL Slug mode produces clean, lowercase strings with hyphens — ideal for web URLs. Filename mode is similar but also allows dots and underscores, which are common in file names. Variable mode produces camelCase, and Constant mode produces SCREAMING_SNAKE_CASE.

Use this tool from AI agents. The CodeTidy MCP Server lets Claude, Cursor, and other AI agents use this tool and 46 others directly. One command: npx @codetidy/mcp

Drop file to load