Convert text to kebab-case

Type “Getting Started Guide” to get getting-started-guide, live as you type. kebab-case is the convention for URLs, CSS classes and custom HTML attributes: search engines treat hyphens as word separators. It cannot be a variable name in most languages, because the hyphen parses as subtraction. Conversion stays in this tab.

camelCase

gettingStartedGuide

PascalCase

GettingStartedGuide

snake_case

getting_started_guide

kebab-case

getting-started-guide

CONSTANT_CASE

GETTING_STARTED_GUIDE

Converted as you typeNothing leaves this tab

Runs in this tab · nothing is uploaded · Verify in 10 seconds →

What this does

kebab-case lowercases words and joins them with hyphens: “Getting Started Guide” becomes getting-started-guide, and camelCase input like pageHeaderTitle becomes page-header-title. Type below and read the kebab-case row, it updates live.

kebab-case's home turf is the one place the other conventions cannot go: URLs, where search engines treat the hyphen as a word separator but the underscore as a word joiner, ten-tips indexes as two words, ten_tips as one token. The cost is symmetrical with snake_case: on our corpus's 244 unique keys, kebab-case averages 7.5 characters against camelCase's 7.2, one hyphen per word boundary.

When it goes wrong

kebab-case cannot be a variable name in most languages, because the hyphen parses as subtraction (page-header is page minus header), so if code is the destination, you wanted the camelCase or snake_case row. If the output feeds a URL and contains characters beyond words (accents, symbols, “&”), this converter is the wrong size: the Slug Generator additionally strips diacritics and maps symbols to words.

When to use this

kebab-case is the convention for URLs, web file names, CSS classes and custom HTML attributes, case-insensitive contexts where underscores are awkward.

This page is a focused view of theCase Converter, which has the full set of options.

Frequently asked questions

Why kebab-case for URLs instead of underscores?

Search engines treat hyphens as word separators but tend to treat underscores as joiners, so ten-tips reads as two words while ten_tips reads as one. Hyphens are also visible inside underlined links.

Can kebab-case be used for variable names?

Not in most languages, the hyphen parses as subtraction. It lives in URLs, file names, CSS and HTML, while code uses camelCase or snake_case.