devkult_
tools26converters34
home/convert/snake-to-camel

Convert snake_case to camelCase

Consuming a Python or Ruby API from JavaScript usually means mapping snake_case fields to camelCase properties. This converter splits identifiers on underscores, lowercases the first word, and capitalizes the rest — the standard camelCase convention in JavaScript, Java, and Swift.

Example · snake_casecamelCase
snake_case input
user_name
created_at
http_server_error
is_active
camelCase output
userName
createdAt
httpServerError
isActive

Try it with your own data

Loading tool…

How to convert snake_case to camelCase

  1. Split the identifier on each underscore (user_name → user, name).
  2. Lowercase the first word and capitalize the first letter of every following word.
  3. Join the words back together with no separator.

Frequently asked questions

What is the difference between camelCase and PascalCase?

camelCase starts with a lowercase letter (userName); PascalCase capitalizes the first word too (UserName). JavaScript uses camelCase for variables and PascalCase for classes and React components.

Should JSON API fields be camelCase or snake_case?

There is no single standard — Google's JSON style guide says camelCase, while many Python and Rails APIs emit snake_case. Pick one convention per API and convert at the boundary.

How does the converter know where words start and end?

It splits on separators (underscores, hyphens, spaces) and on lowercase-to-uppercase boundaries, keeping acronym runs together — so HTTPServerError splits into HTTP, Server, Error regardless of the input convention.

Can I convert many identifiers at once?

Yes — put one identifier or phrase per line and every output format converts the whole list, ready to copy as a block.

Related converters