Blog
Wild & Free Tools

How to Convert Excel Data to JSON for REST API Testing

Last updated: March 31, 2026 5 min read

Table of Contents

  1. Why API Teams Keep Data in Excel
  2. Using Excel JSON as Postman Mock Data
  3. Database Seed Data
  4. Cleaning the JSON for API Schemas
  5. Formatting vs Minified JSON for APIs
  6. Frequently Asked Questions

API developers and testers often maintain test data in Excel spreadsheets — it is easy to edit, share, and hand off to non-technical team members. Converting that data to JSON for Postman collections, database seeds, or API request payloads used to require a script. A browser-based converter makes it a 30-second task.

Why API Teams Keep Test Data in Excel

Excel spreadsheets are a common format for test data in API development because:

The challenge is getting that Excel data into JSON format for use in API tools. A browser-based converter bridges the gap: upload the Excel file, get a JSON array, copy it into your tool of choice.

Using Excel-to-JSON Output as Postman Mock Data

Postman allows you to use JSON data for data-driven tests via its Collection Runner. Convert your Excel test data to JSON and feed it directly into Postman:

  1. Convert your Excel file to JSON using the browser tool
  2. Download the JSON file
  3. In Postman, open Collection Runner
  4. Select your collection and click "Select File" under Data
  5. Upload the JSON file
  6. Postman iterates through each row of your Excel data as a separate test run

Note: Postman Collection Runner also accepts CSV format. If your data is simple (no nested structures), downloading as CSV from the Excel Viewer may be slightly faster than converting to JSON first.

Sell Custom Apparel — We Handle Printing & Free Shipping

Using Excel JSON as Database Seed Data

Database seed scripts typically require JSON arrays where each object maps to one row. The output from the Excel-to-JSON converter is exactly this format.

For Node.js / Mongoose (MongoDB):

const data = require("./seed-data.json");
await Model.insertMany(data);

For Prisma (PostgreSQL/MySQL):

const data = require("./seed-data.json");
for (const row of data) {
  await prisma.tableName.create({ data: row });
}

The main cleanup needed: ensure column headers in your Excel file match your database field names exactly. A few minutes of header cleanup in Excel saves time on post-conversion renaming.

Cleaning the JSON to Match Your API Schema

The raw converter output is a flat array of objects. API schemas often require specific formats that need minor adjustments:

Formatted vs Minified JSON — Which to Use for APIs

The converter offers a toggle between formatted (indented) and minified JSON output.

Use formatted JSON when: reviewing the output manually, committing to a git repo, using as Postman test data, or feeding to a seed script.

Use minified JSON when: embedding in a request payload, reducing file size for large datasets, or passing directly to a CLI tool.

APIs themselves do not care about whitespace — both formatted and minified JSON are parsed identically by any server. The choice is purely about readability and file size.

Try It Free — No Signup Required

Runs 100% in your browser. No data is collected, stored, or sent anywhere.

Open Free Excel to JSON Converter

Frequently Asked Questions

Can I use Excel-to-JSON output directly in Postman?

Yes. Postman Collection Runner accepts JSON files as data sources for data-driven tests. Convert your Excel file to JSON with the browser tool, download the file, and upload it in the Collection Runner under the Data option.

How do I convert Excel test data to JSON for database seeding?

Upload your Excel file to the browser converter, select the sheet with your test data, and click Download JSON. The output is a JSON array of objects matching your row data. Use it directly in Node.js seed scripts with insertMany or Prisma create calls.

Does the converter handle nested JSON for API payloads?

No. The browser converter produces flat JSON arrays — one object per row, one key per column. For nested API payloads, convert to flat JSON first, then restructure the output in code or a JSON transformation tool.

What is the best format for Excel column headers when converting for API use?

Use camelCase (firstName, emailAddress) or snake_case (first_name, email_address) to match your API field names. Avoid spaces and special characters in headers — they create JSON keys that require bracket notation in JavaScript.

Marcus Webb
Marcus Webb Full-Stack Developer

Marcus has five years of data engineering experience building visualization and transformation tools. He leads spreadsheet and charting tool development at WildandFree.

More articles by Marcus →
Launch Your Own Clothing Brand — No Inventory, No Risk