converttexttools.com

kebab-case Converter

Convert text to kebab-case for CSS classes, URLs and file names.

Words
0
Characters
0
No spaces
0
Sentences
0
Paragraphs
0
Reading time
0 sec

Private: this tool runs in your browser. No data is stored on this website. Learn more

What is the kebab-case Converter?

kebab-case writes words in lowercase separated by hyphens: “Primary Button Large” becomes “primary-button-large”. The name comes from the words looking like pieces on a skewer.

It is used for CSS class names, HTML attributes, URL paths, npm package names, and file names in many web projects. This converter handles camelCase, PascalCase, snake_case and normal sentences, one per line.

How to use the kebab-case Converter

  1. Enter one phrase or name per line.
  2. Each line becomes kebab-case.
  3. Copy the result.

Examples

Input
primaryButtonLarge
Output
primary-button-large
Input
My Blog Post Title
Output
my-blog-post-title

When to use it

  • CSS class names
  • URL paths and slugs
  • npm package and file names
  • HTML data attributes

Frequently Asked Questions

What is kebab-case?

Lowercase words separated by hyphens, e.g. my-class-name.

Is kebab-case the same as a URL slug?

Very similar. For URLs from titles, the URL Slug Generator also removes apostrophes and handles accents for SEO.

Why can’t I use kebab-case for JavaScript variables?

The hyphen is the minus operator in JavaScript, so use camelCase for variables.