CSV and JSON conversion: quotes, headers, UTF-8 and formula strings
CSV to JSON requires unique headers and consistent column counts. JSON to CSV accepts arrays of objects and combines their keys. Formula-like strings receive output protection; still compare the source and imported result.
| Problem | Check first | Outcome |
|---|---|---|
| CSV parsing fails | Closed quotes and consistent column counts | Quoted commas and newlines remain fields |
| JSON is rejected | An array of objects is required | Not every JSON shape is a table |
| A leading apostrophe appears | The original resembles a formula | Protective output, not a lost source value |
| Unicode is garbled | Save correctly readable text as UTF-8 | Renaming a file does not repair encoding |
CSV is not a simple comma split
Fields containing commas, quotes or line breaks must follow CSV quoting rules. The first row supplies names. Empty or duplicate names prevent clear field mapping and are rejected. Check UTF-8 and the 5 MB text-file limit.
Strings remain strings
A name,note example can include a quoted multiline note. Conversion keeps strings rather than guessing that 00123 is a number or reinterpreting a date. Review headers and the first and last records; keep the original for comparison.
Objects with different keys
JSON to CSV combines keys across the object array. Nested objects become serialized text, not automatically normalized relational tables. Review missing values and quoting; an empty value is not automatically numeric zero.
Why an apostrophe is added
Spreadsheets can interpret strings starting with characters such as =, +, - or @ as formulas. The tool prefixes potential formula strings with an apostrophe to reduce direct interpretation. The sample includes literal =1+1. Inspect the CSV in a text editor and check import settings; this is not a universal safety guarantee for every importer.
Keep data local and review it
Processing in the browser avoids sending client lists or work data to a conversion service. Practice with synthetic examples rather than posting personal data to public forums. CSV to PDF provides text layout, not an interactive spreadsheet.
Example: addresses contain commas and notes span lines
Do not split CSV blindly at every comma or newline. Quoted fields can contain both, and embedded quotation marks need correct handling. Test three records covering commas, quotes and multi-line notes; verify JSON keys and row count. RFC 4180 describes a common CSV convention, but the destination system’s delimiter and import requirements still control your workflow.
Check types and empty values
Phone numbers and identifiers may have leading zeroes, and long IDs can exceed spreadsheet display precision. Confirm that identifiers remain text. Empty strings, missing properties and JSON null are different concepts; nested objects do not automatically map to a flat table. Define the column rules and re-import a sample into the receiving system before using the full dataset.
Example: order IDs and optional notes
Test a normal note, an empty note and a note containing commas and quotation marks. Treat an ID such as 000123 as an identifier string rather than an arithmetic value. Check JSON property names, record counts and empty-value representation, then inspect quoting and line breaks after converting back to CSV. A readable round trip is not automatically identical: column order, empty-value rules and numeric types may change.
Valid JSON is not the same as a valid business record
Parsing confirms syntax, not required fields, reasonable amounts or unique IDs. A receiving system may impose its own date format, property names and allowed types. Validate those separately. Decide how nested arrays and objects should be flattened before producing a spreadsheet. Putting an entire JSON object into one cell may preserve text, but it does not necessarily create the analytical table you intended.
Try synthetic examples
Inputs contain no personal data. Outputs were generated with the tool code in a local DOM/VM test environment; these are not browser screenshots.
References and scope
These references explain formats and underlying technologies. CAPYPDF-specific workflows and limits follow this implementation; external documentation does not certify our results or endorse this service.