What is kebab-case?
kebab-case joins words in lowercase and separates them with hyphens, like first-name or main-content. It is the standard style for URL slugs, CSS class names, HTML attributes and many CLI options. This tool converts any text to kebab-case instantly in your browser.
How to use
- Paste your text into the input box.
- The kebab-case result appears instantly.
- Click Copy to use it.
Examples
| Input | kebab-case |
|---|---|
First Name | first-name |
totalOrderCount | total-order-count |
user_id | user-id |
HTML Parser | html-parser |
Common uses
- URL slugs (SEO-friendly page addresses).
- CSS class names and HTML attributes.
- Command-line flags and file names.
Frequently asked questions
Why is kebab-case good for URLs?
Search engines treat hyphens as word separators, so kebab-case slugs are readable and SEO-friendly.
Difference from snake_case?
kebab-case uses hyphens (first-name); snake_case uses underscores (first_name).
Does it lowercase the text?
Yes, kebab-case is lowercase with hyphens between words.