Slug Generator

Turn a title or phrase into a clean, URL-friendly slug and its common code-style variants.

What a slug is

A slug is the readable part of a URL, such as my-first-post. Short, lowercase, hyphenated slugs are easy to read and share.

Options and variants

Choose to lowercase the text, strip numbers and pick a hyphen, underscore or dot separator. The tool also shows kebab-case, snake_case, camelCase and PascalCase versions.

How to use it

  1. Type or paste text into Input text.
  2. Set the options and separator.
  3. Copy the slug or one of the variants.

Example

The text:

Hello World! This is a Blog Post.

gives the slug hello-world-this-is-a-blog-post, plus hello_world_this_is_a_blog_post, helloWorldThisIsABlogPost and HelloWorldThisIsABlogPost.

Common use cases

What happens to your text

The slug is built in a fixed order. First, accented letters are decomposed and their marks are removed, so é becomes e and ü becomes u. Next comes lowercasing (if ticked) and removal of digits (if Strip numbers is ticked). Then every run of characters that is not a letter or digit is replaced by one separator, and separators at the very start or end are trimmed.

Crème Brûlée: 10 Easy Recipes!   ->  creme-brulee-10-easy-recipes
Top 10 Tips (2026 Edition)       ->  top-10-tips-2026-edition
same, Strip numbers + underscore  ->  top_tips_edition
C++ vs C# — what's better?       ->  c-vs-c-what-s-better

Notice the last line: an apostrophe splits what’s into what and s. Edit the input to whats if you want a tidier slug.

Limits you should know

Only the letters A to Z and digits 0 to 9 survive. Characters that have no ASCII form after accent removal, such as Chinese, Japanese, Arabic, Cyrillic or the German ß, are dropped, so a title written entirely in such a script gives an empty slug. For multilingual sites, transliterate first or let your CMS handle Unicode slugs. The variant table (kebab-case, snake_case, camelCase, PascalCase) is derived from the finished slug, so options such as lowercase affect it too.

Slug advice for SEO

Keep slugs under about 60 characters and drop filler words such as “the” and “a”. Do not put dates in slugs unless the content is genuinely date-bound, since changing a URL later needs a redirect. Use hyphens, which search engines treat as word separators, rather than underscores. Once a URL is published, avoid changing it.

Choosing a variant

Use the hyphenated slug for URLs and file names on the web, snake_case for Python variables and database columns, camelCase for JavaScript variables and JSON keys, and PascalCase for class and component names. Git branches also read well in kebab-case, for example fix-login-redirect. Whichever you choose, apply the same convention across the whole project.

Frequently asked questions

What is a good URL slug?

Short, lowercase, descriptive words separated by hyphens.

Are special characters removed?

Yes, punctuation is dropped when the slug is created.

Hyphen or underscore?

Hyphens are the usual choice for URLs.

Is my data uploaded?

No. This tool runs entirely in your browser, so what you type or paste is not sent to our servers.

Why is my slug empty?

The text probably contains only characters that are not Latin letters or digits, such as Chinese or Cyrillic. Those are removed. Transliterate the text first.

Does it handle accents?

Yes. Accented Latin letters are converted to their plain forms, so café becomes cafe.

Related tools

Explore all developer tools →