Skip to content

Text to URL Slug Converter

Type or paste a title and get a URL slug in kebab-case, snake_case and camelCase at once, with a preview address and character counts. Accented Latin letters are transliterated, punctuation is dropped and spaces collapse to one separator. Free, no sign-up, and the text is converted in your browser.

Turkish is the only language that cases the letter i differently: İ lowers to i, and i raises to İ.

How to Use the URL Slug Generator

  1. 1. Type or paste a title. The slugs appear as you type; there is nothing to submit.
  2. 2. Check the counts. Input Characters is your text; Slug Characters is the length of the kebab-case slug.
  3. 3. Copy the version you need. Kebab-case is the one for web addresses. Snake_case and camelCase are for file names, database columns and code.
  4. 4. Preview the address. The URL preview shows the kebab-case slug after https://example.com/.
  5. 5. For Turkish text, tick Turkish i rules (İ ı) so that İ and I lowercase correctly.

What Makes a Good Slug

A slug is the part of a URL that names the page, as in example.com/how-to-cite-a-website. Google's URL structure guidance asks for simple, readable URLs built from words, with hyphens rather than underscores to separate them. Lowercase matters too: apart from the scheme and host, a URL is case-sensitive (RFC 3986), so /Cite-Guide and /cite-guide are different addresses and mixed case invites duplicate pages.

FormatExampleUse it for
kebab-casehow-to-cite-a-websiteURLs, and CSS class names
snake_casehow_to_cite_a_websiteFile names, database columns, Python names
camelCasehowToCiteAWebsiteJavaScript and Java variables, JSON keys

What the Converter Does

  1. Lowercases the text (with Turkish rules if you ticked the option).
  2. Transliterates accented Latin letters — é to e, ü to u, ñ to n, ø to o, ß to ss, æ to ae, đ to d, œ to oe, þ to th and so on.
  3. Replaces runs of whitespace with a single hyphen or underscore.
  4. Removes everything else that is not a letter a–z, a digit, or the separator, then collapses repeated separators and trims them from both ends.
  5. Builds camelCase from the kebab words, capitalising every word after the first.

Worked Example

The title Café Culture: A Guide to Dr. Smith's 2024 Q&A! produces:

VersionResult
kebab-casecafe-culture-a-guide-to-dr-smiths-2024-qa
snake_casecafe_culture_a_guide_to_dr_smiths_2024_qa
camelCasecafeCultureAGuideToDrSmiths2024Qa

The input is 46 characters and the kebab slug 41. Notice what happened to the punctuation: the colon, full stop, apostrophe, ampersand and exclamation mark were removed rather than replaced, so Smith's became smiths and Q&A became qa. If you want q-and-a, type it that way first. The tool also keeps every word, including "a" and "to"; shortening a long slug is an editing decision it leaves to you.

Limits to Know About

  • Only Latin letters are transliterated. Any letter that is a base letter plus accents (ť, ů, ň, ễ and the like) loses its marks, and đ, œ, þ, ß, æ, ø and ł have their own mappings, so Žluťoučký kůň becomes zlutoucky-kun. Every Cyrillic, Greek and CJK character is still dropped silently. Transliterate first with the Cyrillic or Greek transliterator, or use the Accent Remover for Latin text.
  • Existing separators are not converted. In kebab-case an underscore is deleted (snake_case becomes snakecase), and in snake_case a hyphen is deleted (well-known becomes wellknown). Replace them with spaces first if you want a word break.
  • Numbers are kept exactly as typed.
  • No length limit. Search engines show roughly the first part of a long URL, and shorter slugs are easier to read and share, so trim by hand.

Which Tool Do You Need?

This page produces a ready-to-use slug. To change a sentence's capitalisation without removing anything, use the Case Converter or Title Case Converter. To percent-encode text that has to stay readable in a URL query, use the Text Encoder & Decoder.

Frequently Asked Questions

What is a URL slug?
The part of a web address that identifies a page in readable words, such as how-to-cite-a-website in example.com/how-to-cite-a-website. It follows the domain and any folder names.
Why should slugs use hyphens?
Google's guidance recommends hyphens to separate words in URLs, because they are the conventional word separator and are easy to read. Underscores work in a URL but are less easy to read.
What is the difference between kebab-case and snake_case?
Kebab-case separates words with hyphens (my-blog-post) and is the web-address convention. Snake_case separates words with underscores (my_blog_post) and is common in file names, databases and Python.
How are accents and special characters handled?
Accented Latin letters are mapped to plain ones (é to e, ť to t, ß to ss, æ to ae, þ to th). Punctuation and symbols are removed, not replaced, and runs of spaces or separators become one. Letters from other scripts are dropped.
Can I use non-English characters in a URL?
Browsers and search engines can handle them, but they are percent-encoded when copied (é becomes %C3%A9), which makes links long and hard to read. This tool produces plain a–z slugs; if your language needs its own script, transliterate it first or keep the original characters and accept the encoding.
Should I change a slug after a page is published?
Avoid it. Changing the slug changes the address, so existing links and bookmarks break unless you add a permanent redirect from the old address to the new one.
Is my text uploaded anywhere?
No. The slugs are generated in your browser as you type, and nothing is sent to CitationEasy.

Related Tools

More in Data, Markup & Code

See all Data, Markup & Code