kebab-case Converter

Convert text to lowercase-kebab-case for CSS and URLs

Ad placeholder (leaderboard)

kebab-case is the conventional format for CSS class names, HTML attributes, and URL slugs: all lowercase, with hyphens between words. This converter turns any phrase or differently-cased identifier into clean kebab-case.

How it works

The input is normalised into a list of lowercase word tokens, then joined with hyphens. Word boundaries come from separators and from case transitions in camelCase or PascalCase input:

"User Profile Id" -> user-profile-id
"userProfileId"   -> user-profile-id
"user_profile_id" -> user-profile-id
"OpenAPISpec"     -> open-api-spec

Each word is lowercased before joining, producing a result that is safe to use directly as a class name or URL slug.

Tips and notes

Hyphens are preferred over underscores in URLs because search engines treat a hyphen as a word break, improving readability and SEO. Acronyms are lowercased during conversion, so parseHTML becomes parse-html. Note that kebab-case is not a valid identifier format in most programming languages — use snake_case or camelCase for variables and reserve kebab-case for markup, styling, and URLs.

Ad placeholder (rectangle)