Text Tools

Kebab Case

All tools

Join lowercase words with hyphens for class names, file names and route paths.

How it works

Four simple steps

1

Paste a name

Add product titles, CSS classes, or route segments.

2

Lowercase tokens

Words split on spaces, underscores, or capitals.

3

Join with hyphens

Each word connects using kebab-case dashes.

4

Copy slug fragment

Copy the result for URLs or HTML class names.

Kebab Case

About Kebab Case

A design system hands you token names like primaryButtonHover and Card Header Title, and your stylesheet uses hyphenated class names. Paste them in and copy back primary-button-hover and card-header-title.

The converter inserts a hyphen wherever a lowercase letter or digit meets a capital, turns spaces, underscores and dots into hyphens, deletes other punctuation and lowercases the result. That makes it handy for turning JavaScript names into CSS class names, data attributes, package names and file names.

One quirk to know: existing hyphens are left alone and are not merged with neighboring spaces, so "Sign up - free" becomes "sign-up---free". Remove spaced dashes before converting, or tidy the output. Line breaks become hyphens too, so convert one name at a time.

For blog and page URLs the URL slug generator is a better fit, since it strips accents properly, can drop stop words and enforces a maximum length. If the target is a Python variable or a database column, switch to snake_case. All conversion happens in your browser as you type.

Keyboard shortcut

Ctrl Enter - Run tool
FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

They look alike, but this converter does not transliterate accents, remove stop words or cap the length. Accented letters are simply deleted. For page URLs the Slug Generator handles those cases.

A spaced dash such as " - " becomes one hyphen for each space plus the original dash. Delete the spaces around dashes first, or collapse the extra hyphens by hand.

Yes. "fontSizeLarge" becomes font-size-large. Consecutive capitals are not split, so "XMLHttp" becomes xmlhttp.

View more FAQs

Related tools

View all

Uppercase

Convert text to UPPERCASE.

Open

Lowercase

Convert text to lowercase.

Open

Sentence Case

Capitalize first letter of sentences.

Open

Title Case

Capitalize each word.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools