use case

How to convert snake_case to camelCase

Convert Python or database identifiers to JavaScript naming conventions.

When consuming a Python API or reading from a database in a JavaScript application, field names often arrive in snake_case but your frontend code expects camelCase. Manually renaming a dozen fields is error-prone. This guide shows how to convert any snake_case identifier to camelCase instantly, and how to automate the conversion across an API client.

Step-by-step guide

  1. Paste the snake_case name: Enter the snake_case identifier — for example 'first_name', 'created_at', or 'is_email_verified'.
  2. Select camelCase as the target: Choose 'camelCase'. The first word stays lowercase; each subsequent word is capitalised.
  3. Apply to your API client: Copy the result. In JavaScript/TypeScript, libraries like 'camelcase-keys' can transform all keys in a response object automatically: camelcaseKeys(responseBody, { deep: true }).

Frequently asked questions

Does the converter handle numbers in identifiers like 'user_2_name'?
Yes. Numbers are treated as part of the preceding token. 'user_2_name' splits into ['user', '2', 'name'] and converts to 'user2Name' in camelCase.
What is the difference between camelCase and lowerCamelCase?
They are the same thing. 'lowerCamelCase' is a more explicit name for the convention where the first word is lowercase (firstName), to distinguish it from PascalCase/UpperCamelCase (FirstName).

Try it now

Use the Text Case Converter to complete this task — free, no sign-up, runs in your browser.

Open Text Case Converter

We use cookies to serve ads and measure traffic. Cookie policy · Privacy policy