Rename Keys (Free Online Tool)

Rename known keys or convert key casing without changing the underlying values

Paste your JSON → Get results instantly (no signup)

⚡ Instant resultsNo signupRuns in your browser
Try examples:

Rename keys in this JSON to camelCase.

{
"user_name": "Alice",
"email_address": "alice@example.com"
}
Output
1{
2 "userName": "Alice",
3 "emailAddress": "alice@example.com"
4}

Love the result?

Use this exact pipeline in your app, backend, or LLM workflow.

No setup needed. Works with curl, Node, Python.

Uses example data. For edited input, copy from the playground.

Read integration guide

Works with:

  • API responses
  • Nested JSON
  • Arrays & objects

Example: input → output

Input / Output
Input
{
"user_name": "Alice",
"email_address": "alice@example.com"
}
Output
{
"userName": "Alice",
"emailAddress": "alice@example.com"
}

Related tools

Advanced usage (optional)

Rename Keys

v1.0.0
Structure
objectarrayreversible

Description

Rename Keys

Transform object key names using case conversion or custom mapping.

Description

This utility renames object keys throughout your JSON structure. You can apply automatic case transformations or provide custom key-to-key mappings.

Configuration

FieldTypeDefaultDescription
Case TransformenumnoneAutomatic case conversion style
Custom Key Mappingsjson{}Manual key-to-key mapping (JSON object)

Case Transform Options

  • camelCase - user_nameuserName
  • snake_case - userNameuser_name
  • PascalCase - user_nameUserName
  • kebab-case - userNameuser-name
  • none - No automatic transformation (use custom mappings only)

Custom Mappings

When case transform is none, or to override specific keys, provide a JSON object mapping old keys to new keys:

{
  "fname": "firstName",
  "lname": "lastName",
  "addr": "address"
}

How It Works

The utility performs these steps:

  1. Traverse - Walk through the entire JSON structure
  2. Rename Key - Apply the transformation to each object key:
  • Apply case transformation (if not none)
  • Apply custom mappings (overrides case transform)

Examples

Convert to camelCase

Input:

{
  "user_name": "Alice",
  "email_address": "alice@example.com"
}

Config:

caseTransform: camelCase
customMappings: {}

Output:

{
  "userName": "Alice",
  "emailAddress": "alice@example.com"
}

Custom Key Mapping

Input:

{
  "fname": "Alice",
  "lname": "Smith"
}

Config:

caseTransform: none
customMappings:
  fname: firstName
  lname: lastName

Output:

{
  "firstName": "Alice",
  "lastName": "Smith"
}

Combining Both

You can use case transformation as the base and override specific keys with custom mappings. Custom mappings take precedence over the case transform.

Configuration

NameTypeDefaultDescription
Case TransformenumnonecamelCase snake_case PascalCase kebab-case none
Custom Key Mappingsjson{}JSON object mapping old keys to new keys

Examples

AI Prompt
Rename keys in this JSON to camelCase.
{
"user_name": "Alice",
"email_address": "alice@example.com"
}
Output
1{
2 "userName": "Alice",
3 "emailAddress": "alice@example.com"
4}
Config
Case Transform
camelCase
Custom Key Mappings
1{}

API Usage

POST /api/v1/utilities/structure.rename-keys
Example:
curl -X POST https://your-domain.com/api/v1/utilities/structure.rename-keys \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"primary":{"user_name":"Alice","email_address":"alice@example.com"}},"config":{"caseTransform":"camelCase","customMappings":{}}}'
Response
1{
2 "userName": "Alice",
3 "emailAddress": "alice@example.com"
4}