DEV Community

Cover image for That online JSON converter you paste prod data into? It's uploading it.
Re Dorp
Re Dorp

Posted on

That online JSON converter you paste prod data into? It's uploading it.

We've all done it. You've got a chunk of JSON — an API response, a config file, a database export — and you need it as YAML or CSV right now. So you Google "json to yaml", click the first result, paste your data in, and copy the output.

Here's the uncomfortable part: a lot of those converters POST your input to a backend. Open the Network tab next time — you'll often see your payload flying off to a server you know nothing about. If that JSON contained an API key, a customer email, or an internal hostname, it just left your machine.

Let's fix that. Here are ways to convert data formats without uploading anything.

Option 1: Do it in code (Node / browser)

If it's a one-off and you already have a terminal open, you rarely need a website at all.

JSON → YAML (using js-yaml):

import fs from "node:fs";
import yaml from "js-yaml";

const data = JSON.parse(fs.readFileSync("input.json", "utf8"));
fs.writeFileSync("output.yaml", yaml.dump(data));
Enter fullscreen mode Exit fullscreen mode

JSON → CSV for a flat array of objects — no dependency needed:

const rows = JSON.parse(fs.readFileSync("input.json", "utf8"));
const headers = Object.keys(rows[0]);
const csv = [
  headers.join(","),
  ...rows.map((r) => headers.map((h) => JSON.stringify(r[h] ?? "")).join(",")),
].join("\n");
console.log(csv);
Enter fullscreen mode Exit fullscreen mode

This is great for scripts and CI. It's less great when you just want to eyeball a conversion once and move on.

Option 2: Client-side tools (the data stays in your tab)

The middle ground is a converter that runs entirely in your browser — the conversion happens in JavaScript on your machine, and nothing is sent anywhere. You get the convenience of a web UI without the "who just received my data?" question.

The quick tell for whether a tool is client-side: open it, go offline (DevTools → Network → Offline), and try a conversion. If it still works, the logic is running locally.

I got tired of not trusting random converters, so I built EasyFormatConverter — a simple set of ~100 free, 100% client-side tools for exactly this: JSON ↔ YAML / CSV / XML / TOML, JSON → TypeScript / Python / Go / Zod / Prisma, Base64, UUIDs, JSON validation, diffing, and more. No upload, no account, no cookies — your data never leaves the tab. (Yes, it passes the offline test.)

But the point isn't which tool you use — it's the habit: before you paste something sensitive, know whether it's staying on your machine.

Option 3: Editor / CLI, if you live there

  • VS Code: extensions convert JSON↔YAML in place.
  • yq: yq -o=json '.' file.yaml — the jq of YAML.
  • jq: reshape JSON without ever touching a browser.

A quick rule of thumb

You need to… Best option
Convert in a script / CI Code or jq/yq
Eyeball a one-off conversion Client-side web tool
Convert sensitive/prod data Anything that doesn't upload

The formats change, the risk doesn't: know where your data goes. Most of the time, the answer should be "nowhere."


I build EasyFormatConverter — happy to answer questions about client-side format conversion in the comments.

Top comments (1)

Collapse
 
shiwei_xie_24a93f54203fb3 profile image
shiwei xie

Nice write-up! For devs who deal with messy copied text, TextStow might help — it's a Mac menu bar tool combining clipboard history with prompt templates and text cleanup. Free: textstow.com