Format Converter

Format Converter API

Development

Free JSON, CSV, and XML converter. Easily transform data formats with our intuitive online tool for developers.

Authentication

All API requests require a valid API key passed in the Authorization header as a Bearer token.

Rate Limit

100 requests per minute

Endpoints

1 endpoint available

Overview

The Format Converter API transforms data between JSON, CSV, and XML formats.

Supported Conversions

  • JSON to CSV, XML
  • CSV to JSON, XML
  • XML to JSON, CSV

Features

  • Handles nested objects and arrays
  • Automatic format detection for input
  • Preserves data structure during conversion
  • Pretty-printed output for readability

Endpoints

POST
/v1/tools/format-converter
Convert data between JSON, CSV, and XML formats

Request Body

Content-Type: application/json

ParameterTypeRequiredDescription
data
string
Required
The input data to convert
inputFormat
string
Required
Input format: "json", "csv", or "xml"
outputFormat
string
Required
Output format: "json", "csv", or "xml"

Response Example

{
  "success": true,
  "data": {
    "convertedData": "<?xml version=\"1.0\"?>\\n<root>\\n    <item>\\n        <name>John</name>\\n        <age>30</age>\\n    </item>\\n</root>",
    "inputFormat": "json",
    "outputFormat": "xml"
  }
}

Error Codes

400
Bad Request - Invalid input format or malformed data
401
Unauthorized - Invalid or missing API key
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error

Code Examples

curl -X POST https://api.opentools.ca/v1/tools/format-converter \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data": "[{\"name\": \"John\", \"age\": 30}, {\"name\": \"Jane\", \"age\": 25}]",
    "inputFormat": "json",
    "outputFormat": "csv"
  }'

Ready to get started?

Create an API key to start using the Format Converter API.