Move spreadsheet records into JSON without losing identifiers
A practical workflow for headers, quoted cells, leading zeros and flat-record exports.
Prepare a small representative sample
Start with a copy of the source data containing a header and a few rows, including an identifier with a leading zero and a description with a comma. For example, use the headers code,name and the row 0012,"Alex, Jr". Quotes around the name keep its comma inside one field. Each header must be unique; two columns named code create an ambiguous mapping.
Convert, then inspect types
CSV to JSON returns [{"code":"0012","name":"Alex, Jr"}] for that row. The string type is deliberate: turning 0012 into a number would lose its leading zeros. Prices, dates and booleans also remain strings. Convert only the fields your application expects to be numeric and keep identifiers as text. A valid JSON document is not proof that the receiving application will accept those field types.
Check syntax separately from meaning
Use JSON Validator to detect syntax mistakes, then JSON Formatter to inspect nesting and property names. Validation cannot tell you that a price is in the wrong currency or a required field is absent. Compare one resulting record against the API specification or import template. Do not paste private customer information when a synthetic example will reproduce the problem. Processing happens locally here, but copied files and clipboard contents remain your responsibility.
Export back with care
JSON to CSV accepts an array of flat objects. Flatten nested records deliberately: decide which fields belong in a row rather than converting an object to an unreadable cell. Formula-like strings are escaped, which may add an apostrophe. When opening the CSV in a spreadsheet, choose text import for identifiers and inspect dates before saving. CSV has no type metadata, so conversion alone cannot prevent spreadsheet software from interpreting a code as a number. Keep the source file until you have checked record count, column names and a few edge cases.
Try the workflow
- CSV to JSON — Convert CSV rows into JSON objects.
- JSON Validator — Check JSON syntax with clear errors.
- JSON Formatter — Make nested JSON easier to read.
- JSON to CSV — Export an array of records as CSV.
How we check calculations and correct errors · Report a problem with this guide