How to Map JSON and CSV Fields from One Shape to Another
Reshape exports for another system: map fields, build names with templates, fix dates and numbers, and save the mapping to run again on the next file.

How to Map JSON and CSV Fields from One Shape to Another
Almost every integration contains the same chore. One system exports data in its own shape, another system expects a different shape, and somebody has to translate between them. Field names differ, a full name is split into two columns on one side and joined on the other, dates are written day first in one country and year first in an API, and numbers arrive as text with thousands separators. This guide shows how to plan such a translation and run it with the free Data Mapping Transformer, without writing a script.
Start with a sample, not the whole file
Pick ten or twenty representative rows from the export, including the awkward ones: an empty email, a name with an accent, a date at the end of the month, a refund with a negative amount. Mapping rules are easier to get right on a small sample where you can see every value, and the same rules will run on the full file later.
Load the sample as a JSON array, as newline-delimited JSON or as CSV with a header row. If the JSON wraps the rows inside an object, for example under data or items, the tool finds the first array of objects for you or lets you type its path.
Write down the target first
Before building rules, list the fields the receiving system expects, with their types. Paste that list into the auto-map box and the tool creates one rule per target name, already linked to the source field with the closest name. Exact matches are found immediately; names that differ only in case, underscores or hyphens are matched too. Anything left unmatched gets an empty rule that you fill by hand.
Sources: field, join, template or fixed value
A rule takes its value from one of four places. A single field is the common case. Joining several fields with a separator is useful for address lines. A template, where field paths sit in curly braces, builds values such as a display name from first and last name with a space between. A fixed value records where the data came from, which helps later when records from several feeds end up in one table.
On a computer you can drag a source field chip onto a rule. On a phone, tap the chip and then press the Use button that appears on each rule.
Format steps fix the values
Each rule can have a chain of steps that run in order. Typical chains are:
- Trim, then lowercase, for email addresses.
- Title case for names typed in capitals or all lowercase.
- To number for amounts such as 1,249.90, which strips separators and symbols first.
- Date format from day-month-year to ISO for dates like 05/03/2024.
- To true/false for yes, no, Y, N, 1 and 0.
- Map values to turn codes such as M and F into labels.
- Default if empty, so the receiving system never sees a blank where it expects a value.
The value of every rule for the first row is shown under the rule while you edit, so a wrong date order is visible immediately.
Check the output, then save the mapping
The output panel shows the reshaped rows as JSON, NDJSON or CSV. Nested target paths such as buyer.address.city create nested objects in JSON and dotted column names in CSV. If a conversion fails, for example a word in a number column, the value becomes null; switch on Leave out empty values if the target prefers missing fields to nulls.
When the sample looks right, press Save mapping. The JSON file holds every rule and setting. Next month, load the new export, load the mapping, and download the result in seconds.
Common pitfalls
Ambiguous dates are the classic trap. 04/05/2024 is the fourth of May in most of the world and the fifth of April in the United States. Never rely on automatic guessing for real data: set the input order explicitly. Thousands separators are the second trap, because a comma is a decimal separator in many European exports. Look at a few values before choosing the number step.
Keep in mind what a mapping does not do. It produces one output row per input row, so splitting an order into one row per item, or summing rows into totals, is a different kind of job. And it does not know the target system's rules, so test the result against that system before importing thousands of records.
Your data stays local
Files are read by the page in your browser and never uploaded. The mapping and sample are stored in local storage on your device, which makes the tool safe for customer lists and order exports.



