Free Online camelCase to kebab-case Converter

Convert camelCase to kebab-case instantly: paste a variable, function or column name and copy the result, with examples.

Converter

camelCase, snake_case, kebab-case & Every Naming Style In Between

Convert an identifier or phrase between 17 case conventions

—

Results are provided for informational purposes only and may contain errors. Please verify important information independently. Use of this tool is at your own risk.

How to convert camelCase to kebab-case

Convert camelCase names to kebab-case instantly. Type or paste a variable, function or column name and get the kebab-case version as you type.

  1. Type or paste a camelCase name, such as mainNavItem, into the box above.
  2. The kebab-case version appears right away: mainNavItem becomes main-nav-item.
  3. Copy the result, or pick one of 17 naming styles for the From and To boxes.

How the conversion works

The converter first splits the name into words: at each capital letter, underscore, hyphen, dot and space. Then it writes the words in kebab-case: every word lowercase, joined with hyphens. Runs of capitals such as HTTP are kept together as one word, and digits stay attached to the word they follow.

camelCase to kebab-case examples

camelCasekebab-case
getUserByIdget-user-by-id
firstNamefirst-name
parseHTTPResponseparse-http-response
isValidis-valid
totalPriceUsdtotal-price-usd
address2Lineaddress2-line

camelCase and kebab-case explained

camelCase starts with a lowercase word and capitalizes every following word, with no separators. It is the standard for variables and functions in JavaScript, Java, C# and Swift.

kebab-case writes every word in lowercase and joins them with hyphens. It is used in URLs, CSS class names, HTML attributes and file names.

Frequently asked questions

What happens to acronyms like HTTP or ID?

A run of capital letters is treated as one word, so parseHTTPResponse becomes parse_http_response in snake_case.

Does it change the meaning of my code?

No. It only rewrites the name. Remember to rename every place that uses the name, or your code will look for the old one.

Which style should I use?

Follow the convention of your language or project: camelCase in JavaScript and Java, snake_case in Python, Ruby and SQL, kebab-case in URLs and CSS.

Is this tool free?

Yes, it's free to use. No signup, no email required. Get results on this page.

How do I get my result?

Use the tool on this page. Your result appears here; no email delivery is required.