Categories

XLSX JSON Transformer

Bidirectional conversion between JSON arrays and Excel sheets, with nested object flattening and restoration

Convert data both ways:

  • JSON array -> XLSX spreadsheet (flatten nested paths)
  • XLSX spreadsheet -> JSON array (restore nested objects)

Nested key paths use a configurable separator (default: dot notation).

Example Results

2 examples

Flatten Nested JSON to XLSX

Convert nested JSON array into an Excel sheet with dot-path columns

xlsx-json-transformer-example1.xlsx View File
View input parameters
{ "mode": "json_to_xlsx", "jsonInput": "[{\"id\":1,\"user\":{\"name\":\"Alice\",\"address\":{\"city\":\"Paris\"}},\"tags\":[\"a\",\"b\"]}]", "pathSeparator": ".", "arrayMode": "index" }

Restore Nested JSON from XLSX

Read flattened columns from Excel and rebuild nested JSON objects

xlsx-json-transformer-example2.json View File
View input parameters
{ "mode": "xlsx_to_json", "excelFile": "/public/samples/xlsx/xlsx-json-transformer-example1.xlsx", "pathSeparator": ".", "restoreTypes": true }

Click to upload file or drag and drop file here

Maximum file size: 100MB Supported formats: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel

Key Facts

Category
Format Conversion
Input Types
select, textarea, file, text, checkbox, number
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

The XLSX JSON Transformer is a specialized utility designed for seamless bidirectional conversion between JSON arrays and Excel spreadsheets, enabling you to flatten complex nested objects into tabular formats or restore structured JSON from flat Excel files.

When to Use

  • When you need to export nested JSON API responses into a readable Excel format for business reporting.
  • When you need to import data from an Excel spreadsheet into a JSON-based application or database.
  • When you want to manage complex, multi-level data structures in a familiar spreadsheet interface without losing the original object hierarchy.

How It Works

  • Select your transformation mode: JSON to XLSX or XLSX to JSON.
  • Upload your file or paste your JSON array into the input field.
  • Configure the path separator (e.g., dot notation) to define how nested object keys are mapped to spreadsheet columns.
  • Execute the transformation to download your converted file or view the structured output.

Use Cases

Preparing API data for non-technical stakeholders to review in Excel.
Bulk-editing configuration files that are easier to manage in a spreadsheet.
Migrating legacy Excel data into modern JSON-based web applications.

Examples

1. Exporting Nested API Data to Excel

Frontend Developer
Background
You have a complex JSON array containing user profiles with nested address and contact objects.
Problem
You need to share this data with the marketing team, who require an Excel file to perform analysis.
How to Use
Select 'JSON to XLSX', paste your JSON array, and set the path separator to a dot (.).
Example Config
mode: json_to_xlsx, pathSeparator: '.', arrayMode: index
Outcome
A clean Excel file where nested fields like 'user.address.city' appear as individual columns.

2. Importing Spreadsheet Data to JSON

Data Analyst
Background
You have an Excel sheet containing product inventory data with flattened headers.
Problem
Your application requires a nested JSON format to update the product catalog via an API.
How to Use
Select 'XLSX to JSON', upload your spreadsheet, and ensure 'Restore Value Types' is checked.
Example Config
mode: xlsx_to_json, pathSeparator: '.', restoreTypes: true
Outcome
A structured JSON file where the flattened columns are correctly nested back into their original object hierarchy.

Try with Samples

json, xml, xlsx

Related Hubs

FAQ

How does the tool handle nested JSON objects?

It flattens nested objects into columns using a configurable separator, such as 'user.name' for a nested name field.

Can I convert an Excel file back into JSON?

Yes, select the 'XLSX to JSON' mode, upload your file, and the tool will reconstruct the nested JSON structure based on the column headers.

What happens to array data during conversion?

You can choose to either index array elements as separate columns or store them as a JSON string within a single cell.

Does the tool preserve data types?

Yes, when enabled, the 'Restore Value Types' option ensures that numbers, booleans, and null values are correctly interpreted during the conversion process.

Is there a limit to the file size?

The tool supports Excel files up to 100MB to ensure efficient processing and performance.

API Documentation

Request Endpoint

POST /en/api/tools/xlsx-json-transformer

Request Parameters

Parameter Name Type Required Description
mode select Yes -
jsonInput textarea No -
excelFile file (Upload required) No -
sheetName text No -
pathSeparator text No -
arrayMode select No -
keepNullValues checkbox No -
restoreTypes checkbox No -
rootArrayKey text No -
outputIndent number No -

File type parameters need to be uploaded first via POST /upload/xlsx-json-transformer to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-xlsx-json-transformer": {
      "name": "xlsx-json-transformer",
      "description": "Bidirectional conversion between JSON arrays and Excel sheets, with nested object flattening and restoration",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=xlsx-json-transformer",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]