🛠️DevTools

Product Catalog to CSV

Export product data from JSON to CSV for easy import into Shopify, WooCommerce, or other platforms.

Switch tool:
Examples:

💡 Paste a JSON array and it converts to CSV automatically. Download for use in Excel or Google Sheets.

Code Examples

Here's how to achieve this in different programming languages:

1// Convert JSON array to CSV
2function jsonToCsv(jsonData) {
3 const data = JSON.parse(jsonData);
4 const headers = Object.keys(data[0]);
5 const rows = data.map(obj => headers.map(h => obj[h]).join(','));
6 return [headers.join(','), ...rows].join('\n');
7}
8
9const input = `[{"sku": "PROD-001", "name": "Widget A", "price": 19.99, "stock": 100}, {"sku": "PROD-002", "name": "Widget B", "price": 29.99, "stock": 50}]`;
10console.log(jsonToCsv(input));
11
12// Output:
13// sku,name,price,stock
14// PROD-001,Widget A,19.99,100
15// PROD-002,Widget B,29.99,50

More JSON Examples

Related JSON Tools

📚 Learn More