JSON to CSV: From API to Spreadsheet

JSON is the language of APIs — it's what most services return when you ask for data. But when you actually want to do something with that data — filter it in Excel, graph it, share it with a colleague who lives in spreadsheets — you need CSV.

The JSON to CSV converter takes a JSON array of objects and turns it into a table: each object becomes a row, and the object's keys become the column headers. The most common real-world use:

  1. Pull a report from an API (say, your e-commerce orders or analytics events) as JSON.
  2. Paste it into the converter.
  3. Download the CSV and open it in Excel, Google Sheets, or any BI tool.

It sounds trivial, but the manual version — writing a script, installing a library, or copying fields one at a time — eats an hour. The converter handles nested objects reasonably too, flattening inner fields so you don't lose data in the transformation.

💡 Watch your keys: The column order and names come straight from your JSON keys. If your API returns keys like user_email and order_total_cents, that's what your spreadsheet will show. Rename fields in the JSON first if you want friendlier column headers.

CSV to JSON: From Spreadsheet to API

The reverse direction is just as common. You've been maintaining a list in a spreadsheet — products, customers, team members — and now you need it as JSON to seed a database, configure a system, or feed an API.

The CSV to JSON converter reads a CSV file and converts it to a JSON array, using the header row as the object keys. A spreadsheet of products with columns name, price, sku becomes:

[
  { "name": "Widget", "price": 19.99, "sku": "WG-100" },
  { "name": "Gadget", "price": 29.99, "sku": "GD-200" }
]

This is the exact shape most APIs and databases expect, so a spreadsheet becomes a test fixture, a config import, or a seed file in seconds. For a step-by-step walkthrough, see our guide to converting CSV to JSON online.

SQL Formatting & Beautification

SQL is the third format you'll meet constantly, and it's the one most likely to arrive as an unreadable wall of text. Developers dump queries, database exports, and migration scripts that look like they were minified on purpose. A SQL formatter re-indents the query, uppercases keywords, and breaks clauses onto their own lines so you can actually read the logic:

-- Before
SELECT id,email,name,created_at FROM users WHERE status='active' AND created_at>'2026-01-01' ORDER BY created_at DESC LIMIT 50;

-- After
SELECT
  id,
  email,
  name,
  created_at
FROM
  users
WHERE
  status = 'active'
  AND created_at > '2026-01-01'
ORDER BY
  created_at DESC
LIMIT 50;

Formatted SQL matters for more than readability. Reviewing a formatted query makes it far easier to spot a missing join condition, an inverted AND/OR, or a filter that's applied at the wrong nesting level. And when you paste a query into a review or an issue, formatted SQL is dramatically easier for colleagues to understand.

Base64, URL & HTML Encoding

Encoding is the glue between formats. It's not a data-format conversion like JSON↔CSV — it's how binary data, special characters, and reserved symbols are represented as safe text. Three encodings come up constantly:

  • Base64 — encodes binary data (images, files, tokens) as ASCII text. Used in data URIs, email attachments, and JWT tokens. If you've ever seen a string ending in ==, that's base64 padding.
  • URL encoding — replaces characters that can't appear in URLs with % codes. Spaces become %20, and query strings with special characters get encoded before they're sent.
  • HTML entities — replaces reserved characters like <, >, and & so they display as text instead of being parsed as markup.

The encoding converter handles all three in both directions: encode a string for a URL, decode a base64 payload to see what's inside, or escape HTML before pasting code into a page. It's the tool you reach for when something "looks garbled" — because the garbling is almost always an encoding mismatch.

⚠️ Decode before you trust: Base64 is not encryption — it's a reversible text representation. Anyone can decode a base64 string, including the JWT you're about to inspect. Never put secrets in base64 and assume they're protected.

XML and the Rest of the Format Zoo

Beyond the big three, a few other formats show up often enough to matter. XML, the older sibling of JSON, is still everywhere in legacy systems, SOAP APIs, RSS feeds, and configuration files. If you're migrating an old system or integrating with one that predates JSON, you'll need XML↔JSON conversion. YAML, meanwhile, is the default for config files and CI pipelines because it's the most human-readable of all the formats — and the strictest about indentation.

Because these formats are all structured representations of the same data, converting between them is usually lossless for simple data: same objects, same fields, different syntax. The tools on iluv.tools cover the conversions people actually hit, and they all share the same rules — paste data in, get the converted output out, nothing uploaded, no account.

A Browser-Based Data Workflow

Here's how these tools fit together in a typical day of data work:

  1. Grab JSON from an API (Network tab, curl, or a webhook log).
  2. Format it with the JSON formatter so you can read the structure and spot problems. Our JSON formatter guide covers the three syntax errors that break most payloads.
  3. Convert to CSV with the JSON to CSV converter if you need it in a spreadsheet.
  4. Clean it up — strip duplicates, fix inconsistent delimiters, and normalize fields with the CSV cleaner before loading it anywhere important. Our CSV cleaning guide walks through the common messes.
  5. Convert or encode as needed — CSV back to JSON, SQL formatted for review, strings encoded for URLs.

The whole loop runs in your browser. No server processing, no file uploads, no privacy risk — which matters when the data you're transforming is customer information or anything else you'd rather keep off a third-party server.

Convert and clean your data for free
JSON, CSV, SQL, XML, and encoding converters — all browser-based, no uploads, no signup.

Open the JSON Formatter →