Skip to content

Instantly share code, notes, and snippets.

@Fenil265
Created February 22, 2026 17:45
Show Gist options
  • Select an option

  • Save Fenil265/50c5778278a28cb51e8138664bd21846 to your computer and use it in GitHub Desktop.

Select an option

Save Fenil265/50c5778278a28cb51e8138664bd21846 to your computer and use it in GitHub Desktop.
JSON to CSV conversion example with Excel-friendly output

JSON to CSV Conversion Example

JSON (JavaScript Object Notation) is widely used by APIs and web applications to exchange data.
However, spreadsheet tools like Microsoft Excel and Google Sheets work best with CSV (Comma-Separated Values) format.

This example shows how to convert JSON data into CSV format for easy analysis and reporting.


Input JSON

[
  {
    "id": 1,
    "name": "John Doe",
    "email": "john@example.com",
    "skills": ["JavaScript", "React"]
  },
  {
    "id": 2,
    "name": "Jane Smith",
    "email": "jane@example.com",
    "skills": ["Java", "Spring"]
  }
]

Output CSV

id,name,email,skills
1,John Doe,john@example.com,"JavaScript|React"
2,Jane Smith,jane@example.com,"Java|Spring"

Convert JSON to CSV Online

You can convert JSON to CSV instantly using this free online tool:

👉 https://alljsontools.com/json-to-csv

Why use this tool?

  • Handles nested JSON and arrays
  • 100% client-side processing
  • Excel and Google Sheets compatible
  • No login or registration required

Common Use Cases

  • Export API responses to Excel
  • Data analysis and reporting
  • Database imports
  • Sharing structured data with non-technical users
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment