Case Converter — kebab-case, camelCase, snake_case (Free)

Free online tool to instantly convert between kebab-case, camelCase, PascalCase, snake_case, and more. Handy for renaming variables, files, and environment variables in programming.

What Is Naming-Case Conversion?

Programming constantly calls for names built from several words joined together. There are competing conventions for how to separate them — camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE — and which one to use is fixed by the language or the context. This tool breaks the string you enter into words and converts it into every major naming convention at once, listing them side by side.

Word boundaries are detected not only from separators but from the position of capital letters. An acronym with consecutive capitals such as XMLParser is correctly split into XML and Parser. When the input mixes in Japanese or symbols, only the alphanumeric parts are extracted, so an input of Japanese alone produces an empty result.

How to Use the Case Converter

  1. Enter the string you want converted It does not matter which convention it is already written in. hello_world and helloWorld are interpreted the same way.
  2. Pick the form you need The result in every major naming convention is listed together. Find the row for the form you want to use.
  3. Copy it and go The button at the right of each row copies it to your clipboard, ready to paste straight into your editor.

Tips for getting more out of it

  • Acronym runs like XMLParser are correctly split into XML and Parser before conversion.
  • Use the button on the right of each row to copy that result to your clipboard instantly.
  • The right naming convention depends on the language and context: JavaScript/Java variable names use camelCase, class names use PascalCase, Python variables and functions use snake_case, environment variables use CONSTANT_CASE, and URLs or CSS class names typically use kebab-case.
  • Even if Japanese characters or symbols are mixed in, only alphanumeric words are extracted and converted (non-Latin text is excluded from the result).

When Case Conversion Comes in Handy

Porting code to another language

When rewriting from Python to JavaScript, for instance, you can convert snake_case variable names to camelCase in one go — and avoid typos from doing it by hand.

Bridging naming between an API and your code

JSON keys in snake_case with camelCase on the code side is a common pairing. You get the corresponding name immediately.

Creating environment-variable names

Convert the name of a configuration item to CONSTANT_CASE and it is ready to use as an environment variable.

Deciding URL and CSS class names

Convert a feature or component name to kebab-case and use it for a path or a class name.

Naming Convention Terms

camelCase
A style that starts the first word in lower case and capitalises the first letter of each word after it. Used for variable names in JavaScript and Java.
PascalCase
A style that capitalises the first letter of every word. Used for class and type names in many languages.
snake_case
A style that joins words with underscores and keeps everything lower case. It is the standard for variable and function names in Python.
kebab-case
A style that joins words with hyphens. Because most languages cannot use it in identifiers, it appears in URLs and CSS class names.
CONSTANT_CASE
A style that puts everything in capitals and joins words with underscores. Used for constant names and environment-variable names.
Acronym
A word formed from the initials of other words, such as XML or HTML. Because the capitals run together, conventions differ on how word boundaries are judged.

FAQ

Yes. Only alphanumeric words are extracted and converted, so any Japanese portions are excluded from the result. If the input is entirely Japanese (or other non-Latin text), the result will be empty.

Numbers are treated as part of the word, just like letters. For example, version2Update is split into version2 and Update.

No. The conversion runs entirely in your browser, and your input is never sent to a server.
Tool-kun

Side Note — Why Different Programming Languages Ended Up With Different Naming Conventions

snake_case is said to have spread through the C community in the 1970s, when some terminals and editors made it hard to distinguish uppercase from lowercase, so separating words with underscores was preferred. Python and Ruby strongly carry on this tradition.

camelCase, on the other hand, is often traced back to Smalltalk in the 1980s and later Java's design. Java's designers adopted camelCase as the standard style because it looks more compact than underscores, and JavaScript inherited it from there.

kebab-case can't be used as an identifier in most programming languages (because - collides with the subtraction operator). As a result, it's mainly used in places that aren't language identifiers, such as URLs, CSS class names, and command-line arguments.