Text case guide
camelCase vs snake_case
camelCase and snake_case are both common naming styles. The right choice usually depends on the language, API, or project convention you are working inside.
Why naming style matters
A field can be spelled correctly and still fail if the consuming code expects a different case style. This happens often when JavaScript clients talk to Python, Ruby, or database-backed APIs.
Example
user profile image
camelCase: userProfileImage
snake_case: user_profile_image
How to choose a style
- Use the naming style already used by the API, codebase, or schema.
- Convert labels in the Text Case Converter before pasting them into code or docs.
- Keep field names consistent within one payload unless the API explicitly mixes styles.
APIs care about exact names
For JSON payloads, case style is not just presentation. userName and user_name are different keys, and an API may accept one while ignoring the other.
Before converting a batch of names, check the schema or an existing response. Matching the project convention matters more than personal preference.
Common mistakes
- Changing JSON field names while only intending to change display labels
- Mixing camelCase and snake_case in the same request body
- Assuming every language community uses the same default style
- Renaming fields without updating tests and documentation
Related problems
FAQ
Which languages commonly use camelCase?
JavaScript and TypeScript commonly use camelCase for variables and object fields.
Which languages commonly use snake_case?
Python, Ruby, and many database schemas often use snake_case.
Can I convert a list of labels at once?
Yes. Paste the text into the Text Case Converter and choose the target case style.