A case converter that knows the cases programmers actually use

Convert Case is built for prose: title case for a headline, sentence case for a paragraph, upper case for shouting. Those are real needs and it serves them well. They are also not the cases anyone reaches for when renaming a field across a codebase.

Open the Case Converter →

Convert Case and Softland, side by side

 Convert CaseSoftland
Prose casesTitle, sentence, upper, lower, alternatingSentence and title
Identifier casesNot the focuscamelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE
AcronymsTreated as ordinary wordsKept together rather than shattered into letters
Converting a whole listOne block of proseLine by line, each entry converted independently
Where it runsIn the pageIn the page

Acronyms are where naive converters fall apart

Take parseHTTPResponse and ask for snake_case. A converter that splits on every capital letter gives you parse_h_t_t_p_response, which is wrong in a way that is tedious to fix by hand across forty lines. The correct answer is parse_http_response, and getting there means recognising that a run of capitals is one token rather than several.

The same rule has to work in reverse. Converting api_url_id to PascalCase should give ApiUrlId or APIURLId depending on the convention you are following, not a string with the boundaries guessed at. Handling this properly is the single most useful thing a case converter can do and the thing most of them do not.

The job is usually a column, not a sentence

Nobody converts one identifier. They convert a list: the columns from a database schema being turned into struct fields, a set of API keys being renamed for a client library, an enum copied out of one language and into another, a list of feature flags moving from one naming convention to another because the two services disagree.

Converting line by line means pasting the column straight out of wherever it came from and getting a column back. Converting a block as prose means one long run-on line that has to be split again by hand, which is most of the work you were trying to avoid.

Which case goes where, roughly

camelCase for variables and functions in JavaScript, Java and Swift. PascalCase for types, classes and components nearly everywhere. snake_case for Python, Ruby, and most SQL column names. kebab-case for URLs, CSS classes, HTML attributes and file names, because those are case-insensitive in places and an underscore is harder to read in a link. CONSTANT_CASE for environment variables and compile-time constants.

The conventions matter less than consistency within one boundary. A codebase that mixes two is annoying; an API that mixes two in the same response is a bug report waiting to happen, because every client has to special-case a field name that does not match its neighbours.

When Convert Case is the better choice

  • You are working on prose rather than code and want title case that follows a specific style guide, which is a genuinely different problem.
  • You want alternating or inverse case for something novelty-shaped, which this does not offer.
  • You want the additional text utilities that sit alongside it - character counts, find and replace, sorting.

Frequently asked questions

What is the difference between camelCase and PascalCase?
Only the first letter. camelCase starts lower - userName - and PascalCase starts upper - UserName. The convention is usually camelCase for variables and functions, PascalCase for types and classes.
How are acronyms handled?
A run of capitals is treated as one word rather than a series of separate ones, so parseHTTPResponse becomes parse_http_response instead of parse_h_t_t_p_response.
Can I convert a whole list at once?
Yes. Paste one identifier per line and each is converted on its own, so a column of schema fields comes back as a column rather than a single joined string.
What is kebab-case used for?
URLs, CSS class names, HTML attributes and file names. Hyphens survive being lowercased, read cleanly in a link, and avoid the underscore that disappears under a text underline.

Try it yourself

camelCase, snake_case, kebab-case and back.

Open the Case Converter

Convert Case is a trademark of its respective owner. Softland is not affiliated with, endorsed by or sponsored by Convert Case. This comparison reflects how each product works rather than what either costs, because pricing and plan limits change; check Convert Case’s own site for its current terms.