JSON & CSV: leading zeros, nested objects and UTF-8
OHLEEBOX tool guide · Reviewed October 27, 2026
After converting, compare row counts, column names, identifiers and notes with the original. This tool reads CSV values as strings by default.
1. Preserve leading zeros
code,quantity,memo 00123,3,"hello, world"
CSV to JSON produces the following. Notice that quantity is also a string.
[{"code":"00123","quantity":"3","memo":"hello, world"}]Duplicate or blank headers cause errors. Wrap cells containing delimiters or line breaks in double quotes. Write a double quote inside a quoted cell twice.
2. Select an array in an API response
{"data":{"items":[{"id":"00123","address":{"city":"London"}}]}}Select JSON to CSV and enter data.items in the JSON array path field. The selected value must be an array. This path syntax does not support keys containing literal dots.
3. Flatten nested objects
Enable “Flatten nested objects” to produce columns id,address.city and row 00123,London. Arrays remain JSON strings in one cell. With flattening off, the address object is stored as a JSON string in the address column.
An existing key a.b can collide with nested keys a → b. The tool reports an error instead of silently overwriting a column.
4. Fix text encoding in Excel
Enable UTF-8 BOM for CSV downloads. If text still looks incorrect, import the file through Excel’s data import and select UTF-8 and the correct delimiter. A BOM identifies encoding; it does not prevent automatic numeric conversion. Import identifier columns as text to preserve leading zeros.
5. Large integers and formula protection
JSON integers above 9,007,199,254,740,991 may lose precision during JavaScript parsing. Enter long order or account identifiers as strings before conversion. Formula protection adds an apostrophe before strings starting with characters such as =, +, - or @ to reduce the chance that spreadsheet software interprets them as formulas. This changes the original text; choose the setting for your intended use.
6. Is round-trip conversion lossless?
No. CSV values become strings. JSON null and missing values can become blank CSV cells. Flattened columns are not automatically rebuilt into nested objects. Input is limited to 5 MB.