kebab-case Converter
About this tool
About kebab-case Converter
kebab-case writes words in lowercase joined by hyphens: primary-button, user-settings-page, --dry-run. It is how CSS class names and custom properties are usually written, how HTML data attributes and custom elements are named, the standard for command-line flags, and the preferred format for URL paths and many file names, such as Angular and Vue component files. Paste a camelCase prop, a PascalCase component name or a sentence and get the kebab-case form instantly, ready to use as a class, a route or a file name. Acronyms split cleanly, so SVGIcon becomes svg-icon and getHTTPStatus becomes get-http-status. Paste a list of component names one per line to get the matching file names in one go. If you need a URL slug from a full title with punctuation, accents and stop words, the Slug Generator has extra options for that. Nothing you type leaves your browser.
Built and maintained by Abhi JainUpdated
How to Convert Text to kebab-case
- 1
Paste names
Paste words or identifiers into the Text box, one per line for a list.
- 2
Read the kebab-case result
kebab-case is selected, so the result shows under the Text box.
- 3
Copy
Copy or download it, or pick another case from All cases.
kebab-case Converter: questions and answers
What is kebab-case?
A naming style with lowercase words joined by hyphens, like main-nav-item. The words look skewered on a stick. It is also called dash-case, lisp-case or spinal-case.
Why can't I use kebab-case for JavaScript variables?
Because the hyphen is the minus operator: user-name would be read as user minus name. That is why JavaScript uses camelCase, and why CSS properties like background-color become backgroundColor in the DOM style API.
Is kebab-case good for URLs?
Yes. Hyphens are treated as word separators by search engines and stay readable when a link is underlined, so lowercase hyphenated paths are the usual recommendation.
What is the difference between kebab-case and Train-Case?
Train-Case also uses hyphens but capitalises each word (Content-Type), as seen in HTTP header names. kebab-case is all lowercase.
More Case Converter presets
Related tools
- Slug GeneratorTurn titles into clean URL slugs with accent transliteration and length limits.
- Whitespace Visualizer & CleanerReveal tabs, NBSP, zero-width characters and mixed line endings, then clean them.
- Regex TesterTest JavaScript regular expressions live with highlighted matches, capture groups, replace preview and plain-English errors.
- JSON FormatterBeautify, minify and validate JSON with exact error locations, without changing a single value.