How To Convert Text To kebab-case
Learn what kebab-case is, why it suits URLs and CSS, and how to turn any phrase into a clean hyphenated slug.
Quick Answer
This kebab case converter (also called hyphen case) lets you convert to kebab-case instantly, writing everything in lowercase and joining words with hyphens. It will also slugify text for URLs: "User Profile Image" becomes "user-profile-image". It is the standard for CSS class names, HTML IDs, URL slugs, and command-line flags.
Try The kebab-case Converter →Where kebab-case Is Used
The web favors kebab-case: CSS selectors (.nav-item), custom properties
(--color-primary), URL slugs, and filenames all read well with hyphens. Search
engines also split hyphenated slugs into separate words, which helps readability and SEO.
How The Conversion Works
The converter splits your text into words at spaces, underscores, punctuation, and camelCase humps, lowercases each word, and joins them with hyphens: producing a clean slug. For example: "getUserProfile", "get_user_profile", and "Get User Profile" all become "get-user-profile". Each line is converted on its own.
This tool is free and runs online entirely in your browser. Your text stays on your device, protecting your privacy: nothing is uploaded to a server, and results appear instantly.
kebab-case vs Other Naming Conventions
kebab-case is the standard for web-facing identifiers but has some specific limitations compared to alternatives. snake_case uses underscores instead of hyphens and is widely used in Python and SQL: it works as a variable name in any programming language. camelCase uses no separator and capitalises each word, making it the standard for JavaScript and Java variables. PascalCase is like camelCase but capitalises even the first letter, used for class names. Unlike these alternatives, kebab-case cannot be used for variable or function names in most languages because hyphens are interpreted as subtraction operators, so kebab-case stays in the domain of CSS, HTML, URLs, and filenames.