camel · snake · kebab · slug

Case converter and slug generator

Turn a title or an identifier into camelCase, snake_case, kebab-case, CONSTANT_CASE and more — and build a clean, ASCII URL slug.

Words are detected from camelCase, separators and digits.

Conversion happens in this tab. The text you paste — a name, a title, an identifier — is never uploaded.

Short answer: paste the text and every form appears at once — camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, Title, Sentence and lower case, plus a URL slug. Each row has its own copy button.

Word splitting is the whole job

Converting between conventions is easy once you know where the words are. The hard cases aregetHTTPResponse (an acronym inside camelCase), SCREAMING_SNAKE,version2Ready (a digit boundary) and Café Menu (an accent). All four are handled by splitting on case transitions, digit boundaries and any non-alphanumeric run, then folding accents with Unicode NFD.

Which form belongs where

Slug rules that actually matter

Lower case, hyphens, no trailing separator, and short enough to read. Truncation happens before the trailing separator is trimmed, so a cut at the limit never leaves a URL ending in a dash. Stop words are kept: removing "the" from a title changes the title, and a slug that no longer matches its page is worse than a long one.

Turning a title into a URL and need the rest of the pipeline? TheURL encoder handles the characters a slug cannot contain, and the regex tester is there when a naming rule needs enforcing in code.

Case conversion questions

How are acronyms handled?

A run of capital letters followed by a normal word is split before that word, so getHTTPResponse becomes get-http-response rather than get-h-t-t-p-response. All-caps words such as HTTP survive as a single word, which is why Title Case keeps them capitalised.

What happens to accents and non-Latin text?

Accents are folded for slugs, so Café becomes cafe and naïve becomes naive. Text with no Latin letters at all — Devanagari, Chinese, Arabic — is removed by the ASCII slug path, which is why the slug field says so. For those names, keep the original text and use a transliteration tool rather than an empty slug.

Which slug settings should I use?

Hyphens, 60 characters or fewer, lower case. That is the convention search engines and most CMSes expect. Underscores are accepted by browsers but read as one word by some crawlers, so use them only when a system demands it.

Does it change the words themselves?

No. Only the separators and capitalisation change. It also splits digit boundaries, so version2Ready becomes version-2-ready, which is usually what you want for a slug but can surprise you in an identifier.

Is the text uploaded?

No. Conversion happens in this tab, so a name, a title or an internal identifier never leaves your device.

Related tools