Map Values (Free Online Tool)
Remap existing values through a lookup table such as enums, codes, or category names
Paste your JSON → Get results instantly (no signup)
→ Map values in this data using lookup rules and map status codes.
1[2 {3 "name": "Server A",4 "status": "enabled"5 },6 {7 "name": "Server B",8 "status": "disabled"9 }10]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
[ { "name": "Server A", "status": "active" }, { "name": "Server B", "status": "inactive" }][ { "name": "Server A", "status": "enabled" }, { "name": "Server B", "status": "disabled" }]Related tools
- CSV to JSONParse CSV text into a JSON array of row objects for further cleanup or reshaping
- JSON to CSVConvert JSON array row data into final CSV text output
- Format ValuesReformat individual values with case changes, trimming, coercion, and slugification
- Compute FieldCreate derived values or fields from formulas, expressions, and simple conditionals
Advanced usage (optional)
Map Values
v1.0.0Description
Map Values
Replace values using a lookup table — map status codes, translate enums, recode categories, and convert between value representations. Define a mapping of old values to new values, and the utility replaces every match.
How It Works
Provide a JSON object as the mapping table where keys are the original values and values are the replacements. The utility scans targeted fields and replaces any matching values.
{
"active": "enabled",
"inactive": "disabled"
}Values not found in the mapping table can be kept as-is, removed, or replaced with a default.
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| Target Paths | path-picker | [] | Select paths whose values should be mapped (empty = all values) |
| Value Mappings | json | {} | JSON object mapping old values to new values |
| Unmatched Values | enum | keep | keep: leave unchanged. remove: delete the field. default: use the default value. |
| Default Value | string | "" | Replacement for unmatched values (only used when Unmatched Values is default) |
Use Cases
Status Code Translation
- Server status: Map
active/inactivetoenabled/disabled - HTTP codes: Map
200→"OK",404→"Not Found" - Priority levels: Map
1/2/3to"High"/"Medium"/"Low"
Data Standardization
- Boolean strings: Convert
"true"/"false"/"yes"/"no"to actualtrue/false - Country codes: Map
"US"→"United States","UK"→"United Kingdom" - Category recoding: Consolidate similar categories under standard names
Data Migration
- Schema mapping: Translate enum values between old and new schemas
- Localization: Map English labels to translated strings
- Default handling: Replace unknown or legacy values with a standard default
Configuration
| Name | Type | Default | Description |
|---|---|---|---|
| Target Paths | path-picker | [] | Select paths whose values should be mapped (empty = all values) |
| Value Mappings | json | {} | JSON object mapping old values to new values. Example: {"active": "enabled", "inactive": "disabled"} |
| Unmatched Values | enum | keep | keep: leave unchanged. remove: delete the field. default: use the default value. keep remove default |
| Default Value | string | | Replacement for unmatched values (only used when Unmatched Values is "default") |
Examples
Map values in this data using lookup rules and map status codes.1[2 {3 "name": "Server A",4 "status": "enabled"5 },6 {7 "name": "Server B",8 "status": "disabled"9 }10]1{2 "active": "enabled",3 "inactive": "disabled"4}API Usage
curl -X POST https://your-domain.com/api/v1/utilities/convert.map-values \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"inputs":{"primary":[{"name":"Server A","status":"active"},{"name":"Server B","status":"inactive"}]},"config":{"targetPaths":["status"],"mappings":{"active":"enabled","inactive":"disabled"},"unmatchedAction":"keep","defaultValue":""}}'1[2 {3 "name": "Server A",4 "status": "enabled"5 },6 {7 "name": "Server B",8 "status": "disabled"9 }10]