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)
→ Rename keys in this JSON to camelCase.
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.
Works with:
- API responses
- Nested JSON
- Arrays & objects
Example: input → output
{ "user_name": "Alice", "email_address": "alice@example.com"}{ "userName": "Alice", "emailAddress": "alice@example.com"}Related tools
- Find & ReplaceFind and replace matching keys or values across JSON using broad search patterns
- FilterFilter rows, items, keys, or values by explicit conditions and keep only the matches you want
- Flatten / NestConvert nested objects to flat key paths or rebuild them using delimiter and casing rules
- Pick FieldsKeep only a known allowlist of fields and remove everything else
- RestructureFlexibly restructure collections by grouping, unwinding, transposing, or rearranging nested data
Advanced usage (optional)
Rename Keys
v1.0.0Description
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
| Field | Type | Default | Description |
|---|---|---|---|
| Case Transform | enum | none | Automatic case conversion style |
| Custom Key Mappings | json | {} | Manual key-to-key mapping (JSON object) |
Case Transform Options
- camelCase -
user_name→userName - snake_case -
userName→user_name - PascalCase -
user_name→UserName - kebab-case -
userName→user-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:
- Traverse - Walk through the entire JSON structure
- 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: lastNameOutput:
{
"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
| Name | Type | Default | Description |
|---|---|---|---|
| Case Transform | enum | none | camelCase snake_case PascalCase kebab-case none |
| Custom Key Mappings | json | {} | JSON object mapping old keys to new keys |
Examples
Rename keys in this JSON to camelCase.1{2 "userName": "Alice",3 "emailAddress": "alice@example.com"4}1{}API Usage
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":{}}}'1{2 "userName": "Alice",3 "emailAddress": "alice@example.com"4}