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

kebab-case Converter
Convert text to kebab-case for CSS classes, URLs, and file names.
Enter Text
Type or paste text to convert to kebab-case.
View Result
See lowercase hyphenated output instantly.
Copy & Use
Copy for CSS classes, URLs, or file names.
What Is kebab-case Converter?
A kebab-case converter transforms text into kebab-case format, where all letters are lowercase and words are separated by hyphens. kebab-case is the standard naming convention for CSS class names, HTML attributes, URL slugs, npm package names, and file names in many frameworks. Examples: "Hello World" becomes "hello-world", "backgroundColor" becomes "background-color". The name comes from the visual resemblance of words skewered on a hyphen, like items on a kebab stick.
Why Use Our kebab-case Converter?
- Standard for CSS class names and custom properties
- Required format for URL slugs in most web frameworks
- Used for npm package names and Git branch names
- Most readable format for multi-word identifiers in web contexts
- Handles conversion from any input format
Common Use Cases
CSS Classes
Format class names following BEM or standard CSS naming conventions.
URL Slugs
Create SEO-friendly URL paths from page titles or content headings.
npm Packages
Format package names following npm's kebab-case convention.
File Naming
Name files in kebab-case for Angular, Vue, and other component-based frameworks.
Technical Guide
kebab-case conversion follows the same word-splitting algorithm as snake_case but joins words with hyphens instead of underscores. Input is split on whitespace, underscores, dots, existing hyphens, and case transitions. All words are converted to lowercase and joined with single hyphens. Consecutive hyphens are collapsed, and leading/trailing hyphens are removed. The algorithm correctly handles camelCase input ("backgroundColor" → "background-color"), PascalCase ("PageTitle" → "page-title"), and mixed formats. Note that kebab-case identifiers cannot be used directly as variable names in most programming languages because the hyphen is the subtraction operator.
Tips & Best Practices
- 1CSS properties are natively kebab-case: background-color, font-size, border-radius
- 2BEM methodology uses kebab-case with double hyphens: block__element--modifier
- 3kebab-case URLs are preferred for SEO over underscores or camelCase
- 4In JavaScript, access kebab-case properties with bracket notation: obj["my-prop"]
- 5Angular uses kebab-case for component selectors (app-user-profile)
Related Tools

snake_case Converter
Convert text to snake_case for Python variables and database columns.

camelCase Converter
Convert text to camelCase for JavaScript variables and function names.

PascalCase Converter
Convert text to PascalCase for class names and component naming.

Slug Generator
Generate URL-friendly slugs from text with customizable separators.

dot.case Converter
Convert text to dot.case format for configuration keys and properties.

Word Counter
Count words, unique words, characters, and see word frequency in any text.
Frequently Asked Questions
QWhat is kebab-case?
QWhy can't I use kebab-case for JavaScript variables?
QIs kebab-case better than snake_case for URLs?
QWhat about CSS custom properties?
QHow does BEM relate to kebab-case?
About kebab-case Converter
kebab-case Converter is a free online tool from FreeToolkit.ai. All processing happens directly in your browser — your data never leaves your device. No registration required. No ads. Just fast, reliable tools.







