How to convert to kebab-case
- Paste a title, phrase or list of names into the top box.
- The kebab-case version appears below instantly, line by line.
- Copy it into your URL field, stylesheet or file name.
Examples
| Input | kebab-case |
|---|---|
| 10 Easy Recipes for Busy Weeknights! | 10-easy-recipes-for-busy-weeknights |
| primaryButtonLarge | primary-button-large |
| Product_Image_Main | product-image-main |
Where kebab-case is used
- URLs and slugs: WordPress, Shopify and most website builders use hyphenated slugs.
- CSS: class names like
.card-headerand every built in property likefont-size. - HTML attributes:
data-user-id,aria-labeland custom elements like<my-widget>. - npm packages and Git repositories: names such as
react-router. - Command line options: flags like
--dry-run.
Tips for SEO friendly slugs
A good slug is short and tells people what the page is about. After converting, consider removing filler words. For example, 10-easy-recipes-for-busy-weeknights works fine, but easy-weeknight-recipes is shorter and will not look outdated if you later add an eleventh recipe. Avoid dates in slugs for content you plan to update.