Snake Case to Camel Case Converter

Turn 'snake_case' identifiers into 'camelCase' instantly.

Free snake_case to camelCase converter for developers. Paste underscore-separated identifiers and get camelCase output instantly, even from messy mixed input. Runs entirely in your browser — nothing is uploaded. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is snake_case?

Snake_case writes compound words in lowercase separated by underscores, like 'my_variable_name'. It is the conventional naming style in Python, Ruby, Rust, and SQL/database column names.

Paste any snake_case identifier — lowercase words joined by underscores like my_variable_name — and get the equivalent camelCase string such as myVariableName instantly. It is the quickest way to port Python, Ruby, or SQL names into JavaScript, TypeScript, or JSON keys, which conventionally use camelCase.

How it works

The converter runs two steps:

  1. Tokenize. The input is split on every run of non-alphanumeric characters ([^A-Za-z0-9]+), empty pieces are dropped, and each remaining token is lowercased. This means underscores, spaces, hyphens, and even multiple delimiters in a row all act as a single word boundary.
  2. Recombine. The first word stays lowercase; every word after it has its first letter capitalised. The words are then joined with nothing between them.

Because the splitter only breaks on non-alphanumeric characters, embedded digits stay attached to their word.

Conversion examples

InputOutputNotes
my_variable_namemyVariableNameStandard snake to camel
order__total amountorderTotalAmountDouble underscore and space both treated as one boundary
http_2_clienthttp2ClientDigit attached to preceding word
USER_IDuserIdSCREAMING_SNAKE_CASE handled — everything lowercased first
first-namefirstNameHyphens also work as word boundaries

Walking through my_variable_name: split into my, variable, name; the first stays as my; the others become Variable and Name; joined → myVariableName.

Why the two naming conventions exist

snake_case is idiomatic in Python (PEP 8), Ruby (standard library), Rust (variables and functions), and SQL/database column names. The readability argument for snake_case is that underscores visually space words without requiring a capital letter shift.

camelCase is idiomatic in JavaScript, TypeScript, Java, Swift, Kotlin, Go, and Dart for variable and function names. It also matches the convention for JSON property keys in most REST APIs, which is why developers porting data shapes from Python backends to JavaScript frontends often need this conversion.

Common migration scenarios

Python ORM to REST API response: Django or SQLAlchemy models use snake_case field names. When serialising to JSON for a JavaScript client, you may want to rename fields to camelCase. Convert the field names here before updating the serialiser.

Database column to frontend state: SQL columns like created_at, user_id, and first_name become createdAt, userId, and firstName in the frontend object. Convert a list of column names in one paste.

Swagger/OpenAPI spec import: Many OpenAPI codegen tools produce TypeScript interfaces in camelCase from OpenAPI definitions in snake_case. If you are writing the spec by hand, converting your snake_case examples to camelCase first helps you catch naming inconsistencies before code generation.

Edge cases handled

SCREAMING_SNAKE_CASE (all-caps): Variables like USER_ID or MAX_RETRY_COUNT are common in constants and environment variables. The converter lowercases everything first, so USER_ID correctly becomes userId rather than uSERiD.

Consecutive delimiters: order__total or get--value are messy but valid in some codebases. All runs of delimiters are treated as a single boundary, so order__total becomes orderTotal.

Leading or trailing delimiters: _private_var_ strips the leading and trailing underscores and converts the inner words, giving privateVar.

Everything runs in your browser, so your code never leaves your machine.