Skip to content

Text to Slug: URL Slug Generator

Type a title and get the lowercase, hyphenated slug for the end of its URL, with accents and punctuation cleaned out.

Runs in your browserFree, no sign-upLast reviewed

Settings

Results update automatically as you type.

Slug

10-best-ways-to-learn-next-js

Example URL

https://example.com/blog/10-best-ways-to-learn-next-js

Details

Length
29 chars
Words
7

Quick answers

How do I convert text to a slug?
Lowercase it, remove accents and punctuation, and replace each space with a hyphen. Typing "Don't Panic: A Beginner's Guide" into the Title field gives dont-panic-a-beginners-guide. The tool does all of these steps at once.
What is a URL slug?
It is the part of a web address that names one specific page, normally the last segment after the final slash. In example.com/blog/what-is-a-url-slug the slug is what-is-a-url-slug. It is written in lowercase words joined by hyphens so people can read it.
Is there a character limit for a URL slug?
The URL standards set no limit for a slug, but platforms do. WordPress stores slugs in a field of 200 characters. In practice aim for three to six words and well under 60 characters so the address stays readable when shared.
Should a slug use hyphens or underscores?
Hyphens. Search engines' own URL guidance recommends hyphens because they are read as word separators, while underscores can join words together. Underscores are offered here for systems that require them, such as some file naming schemes.
What characters are allowed in a slug from this tool?
Only the letters a to z, the digits 0 to 9 and your chosen separator. Capital letters appear only if you untick Lowercase. Everything else is either stripped or turned into a word break.
How do I turn a title into a URL?
Convert the title to a slug and append it to your site's path. The tool shows an Example URL in the form https://example.com/blog/your-slug; replace the domain and folder with your own.

How URL Slug Generator works

A slug is the readable last part of a web address, such as how-to-bake-creme-brulee-at-home. This converter builds one from any title or string. It strips accents from letters, deletes apostrophes, turns every other symbol or space into a word break, joins the words with a hyphen or underscore, and lowercases the result. "10 Best Ways to Learn Next.js" becomes 10-best-ways-to-learn-next-js. Two optional settings shorten the result: Remove common stop words drops words such as the, of and to, and Max length cuts the slug back to whole words within the limit. The output shows the slug, a sample URL and its length in characters.

Title to slug examples

Real output with the default settings: hyphen separator, lowercase on, stop words kept, no length limit.

Accented letters

How to Bake Crème Brûlée at Home

how-to-bake-creme-brulee-at-home (32 chars)

Apostrophes and a colon

Don't Panic: A Beginner's Guide

dont-panic-a-beginners-guide (28 chars)

Apostrophes are deleted, so don't becomes dont, not don-t.

Ampersand and percent sign

Tom & Jerry's 50% Off Sale!

tom-jerrys-50-off-sale (22 chars)

The & is dropped. Type the word and in the title if you want it in the slug.

A hyphen and a decimal point

Men's Running Shoes - Size 10.5

mens-running-shoes-size-10-5 (28 chars)

Emoji and repeated punctuation

🚀 Launch Day!!!

launch-day (10 chars)

Text that is already snake_case

snake_case_title and kebab-case-title

snake-case-title-and-kebab-case-title (37 chars)

Existing underscores and hyphens are treated as word breaks and replaced with the chosen separator.

What each option does to the same title

Title used: The Complete Guide to Growing Tomatoes in Small Urban Gardens

SettingsSlugLength
Defaultsthe-complete-guide-to-growing-tomatoes-in-small-urban-gardens61 chars
Remove common stop wordscomplete-guide-growing-tomatoes-small-urban-gardens51 chars
Max length 60the-complete-guide-to-growing-tomatoes-in-small-urban53 chars
Max length 40the-complete-guide-to-growing-tomatoes38 chars
Stop words removed and Max length 40complete-guide-growing-tomatoes-small37 chars

Max length never leaves half a word: the slug is cut at the limit and then shortened back to the previous separator. That step always runs, so a word that ends exactly on the limit is dropped as well: The Complete Guide with Max length 12 gives the, not the-complete. A single word longer than the limit is cut mid-word because there is no separator to fall back to.

How characters are converted

In the titleIn the slugExample
Capital lettersLowercased (unless Lowercase is unticked)iPhone 17 Pro Max Review gives iphone-17-pro-max-review
Letters with accentsAccent removed, base letter keptSão Paulo Travel Guide gives sao-paulo-travel-guide
Apostrophes, straight or curlyDeleted with no gapWhat's New in iOS 26? gives whats-new-in-ios-26
Spaces, punctuation and symbolsOne separator, however many there areHello —— World! gives hello-world
DigitsKept50% Off: Summer Sale (2026)! gives 50-off-summer-sale-2026
Letters with no accent form: ß, ø, æ, łDropped, leaving a word breakFußball gives fu-ball; Smørrebrød gives sm-rrebr-d
Cyrillic, Greek, Arabic, Chinese, Japanese and other scriptsDropped日本語 title 2026 gives title-2026
Symbols that carry meaning: +, #, &DroppedC++ vs C# in 2026 gives c-vs-c-in-2026

The tool does not transliterate. For ß, ø, æ or a non-Latin title, type a Latin spelling first (Fussball, Smorrebrod) and convert that.

The stop words that can be removed

Remove common stop words deletes these 15 words wherever they appear as whole words: a, an, the, and, or, of, in, on, at, to, for, is, are, with, by. No other words are removed.

  • The Lord of the Rings becomes lord-rings.
  • A Tale of Two Cities becomes tale-two-cities.
  • To Be or Not to Be becomes be-not-be, which shows how the option can strip the meaning out of a short title.
  • If every word in the title is a stop word, nothing is removed: The Of And stays the-of-and.
  • Stop words are removed before the Max length cut, so combining both keeps more of the meaningful words.

How long should a URL slug be

No web standard limits the slug itself. The limits that exist apply to the whole address or come from your platform. The sitemap protocol requires each URL to be under 2,048 characters, and WordPress keeps a post slug in a 200-character field, which is also the top of the range on the Max length box here.

Those are ceilings, not targets. A slug works best when a person can read it in a link, say it aloud and guess the page from it. Three to six words usually does that. Long titles rarely need every word: growing-tomatoes-small-urban-gardens carries the topic of the 61-character slug in the table above in 36 characters.

Leave out anything that will date or change, such as a year, a price or a count of items, unless it is the point of the page. A slug should stay the same for the life of the page. If you do change one that is already published, set up a redirect from the old address so existing links keep working.

Step by step

  1. 1

    Type or paste your title into the Title field.

  2. 2

    Leave Word separator on Hyphen (recommended), or switch to Underscore if your system needs it.

  3. 3

    Keep Lowercase ticked unless you need the original capitals preserved.

  4. 4

    Tick Remove common stop words to shorten the slug, and set Max length (0 = no limit) if your platform caps it.

  5. 5

    Copy the Slug or the Example URL, and check Length under Details.

Common questions

Should I remove stop words from a slug?
Only when it shortens the slug without hurting how it reads. how-bake-creme-brulee-home is shorter than how-to-bake-creme-brulee-at-home but clumsier. The option is off by default, and you can always delete single words by hand in the Title field.
Why did my title produce an error instead of a slug?
The title had no unaccented Latin letters or digits left after cleaning. That happens with a title written entirely in another script, such as Cyrillic or Chinese, or made only of symbols or emoji. Type a Latin transliteration and convert that.
Can I keep capital letters in the slug?
Yes. Untick Lowercase and iPhone 17 Pro Max Review becomes iPhone-17-Pro-Max-Review. Lowercase is still the safer choice, because many servers treat /Page and /page as two different addresses.
What is the difference between a slug and URL encoding?
A slug rewrites text into a short readable form and discards what does not fit. URL encoding keeps every character by replacing unsafe ones with percent codes, so a space becomes %20. Use a slug for page addresses and encoding for query values.
Does the Words figure change when Max length shortens the slug?
No. Words counts the words in the title after cleaning and stop-word removal, before any length cut. Length always shows the final slug's character count.
Can I convert a whole list of titles at once?
No. The Title field takes one title at a time and returns one slug. For a list, convert each title separately.
Is this the same as slugify in code libraries?
It follows the same idea and will match most libraries for plain English titles. Results can differ for characters such as ß or &, which some libraries spell out as ss or and. Check a sample against your own system before relying on a match.
Can I use the result as a file name or an HTML id?
Yes. A string of lowercase letters, digits and hyphens is safe as a file name on every major system and as an anchor id. One caution for ids: a value that begins with a digit has to be escaped when you target it in a CSS selector.

Looking for something else? Browse all text tools or see every tool.