Convert Excel Lists to JSON Arrays for API Requests
APIs expect JSON. Spreadsheets give you rows and columns. Here's how to bridge the gap.
Single Column to JSON Array
Input from Excel:
| user@example.com |
| admin@site.org |
| test@domain.net |
Output as JSON array:
["user@example.com", "admin@site.org", "test@domain.net"]Paste this directly into Postman, curl, or your API client.
Multi-Column to JSON Objects
Paste a table with headers:
| name | age | city |
|---|---|---|
| John | 30 | New York |
| Jane | 25 | Boston |
Output as array of objects:
[
{"name": "John", "age": 30, "city": "New York"},
{"name": "Jane", "age": 25, "city": "Boston"}
]Headers become keys. Data types are detected automatically.
Use Cases
POST Request Body
fetch('https://api.example.com/users/batch', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify(userList)
});Configuration Files
Convert settings from a spreadsheet:
{
"allowedDomains": ["example.com", "test.org", "site.net"],
"maxRetries": 3,
"timeout": 5000
}Mock Data for Testing
Generate test fixtures from your spreadsheet:
[
{"id": 1, "sku": "PROD-001", "price": 29.99},
{"id": 2, "sku": "PROD-002", "price": 39.99}
]Data Type Handling
ClipboardTools detects types automatically:
- Numbers:
30stays30 - Strings:
"John"gets quotes - Booleans:
true/falserecognized
Use "Force Strings" if you need everything quoted.
JSON Arrays vs SQL IN Clauses
Use JSON arrays when:
- Calling REST APIs
- Creating config files
- Building JavaScript/TypeScript code
- Storing in NoSQL databases
Use SQL IN clauses when:
- Querying relational databases
- Building WHERE conditions
- Filtering with MySQL, PostgreSQL, etc.
Both formats start from the same spreadsheet data—just pick the output format you need.