Convert JSON to CSV in the Browser, Without Sending the Data Anywhere
A JSON payload usually has to become a CSV before it can go into a spreadsheet, a ticket, or somebody else's tool. The obvious route is a converter site, which means uploading the payload somewhere you do not control. I
A JSON payload usually has to become a CSV before it can go into a spreadsheet, a ticket, or somebody else's tool. The obvious route is a converter site, which means uploading the payload somewhere you do not control.
If that JSON is a customer export, a config dump, or anything with a name in it, the upload is the part worth avoiding.
OnePassApps is one option here, and I work on OnePassApps โ full disclosure. The Data Studio has a To CSV tool that runs in the browser tab:
- Paste the JSON into the Source box, or drop a file in. The panel is three steps: 01 Source, 02 Options, 03 Result. The result step fills in once the tool has run, so you can see what was read before you take the output. In a test with a two-object JSON array it reported 2 rows ยท 4 columns ยท 96 B ยท from Pasted JSON, with a Table and Raw view and a Download CSV button.
- Each object becomes a row and its keys the header row. That mapping is the thing to check: a nested object inside your payload becomes one cell holding JSON text, not a set of extra columns.
- Formula-like cells are prefixed with an apostrophe. A cell a spreadsheet would otherwise read as a formula comes out of the tool as text, so it stays text when the file is opened rather than turning into something that gets evaluated.
The page is plain about where the work happens: "Nothing leaves this tab." and "Processing stays in this browser."
The Studio is free to use right now โ the plan block on the page reads Standard is free right now, $0 / month, 100,000 credits every 30 days, no end date set, no card required.
When a server-side converter is the right call
- The JSON is large. The Data Studio's source box takes CSV, TSV, JSON or YAML up to 20 MiB, and the tab holds the parsed data while it works. Past that, a streaming converter on your own machine handles it better.
- The payload should never be downloaded at all. A browser-local tool reads a file that is already on your disk. If the data must not land on the machine, convert it where it lives.
- The conversion has to run on a schedule. A one-off conversion in a tab is fine. A nightly export is a pipeline, not a page.
The rest of the Studio
The same tab covers the other side of the round trip and the work around it: To JSON, Formatter, Validator and YAML for the JSON and YAML side, plus Viewer, Sort / filter, Columns, Duplicates, Merge and Split for the tabular side. That means you can clean, check and split the data before the conversion instead of moving it between tools to do it.
How these browser-local tools work in general is described in the app's own guides at app.onepassapps.com/guides.
Disclosure: I work on OnePassApps. The behaviour above is what the tools do today; limits and wording may change.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.