---
title: Convert CSV to JSON API
slug: csv-to-json
url: https://apyhub.com/apyhub/service/csv-to-json
provider: ApyHub
categories: [Output Kit]
tags: [csv, json-conversion, file-conversion, data-transformation, etl]
auth: api_key
version: 1.0.0
service_type: sync
endpoints: 9
atoms: 50
mcp: true
alias: converter-csv-json
---

# Convert CSV to JSON API

Convert raw CSV, uploaded files, or CSV URLs into JSON arrays, downloadable files, or pre-signed S3 links for imports and ETL workflows.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/apyhub/csv-to-json/csv-url-json-raw` | What it does Converts a CSV file accessible at a public URL into a JSON array. The endpoint fetches… | 50 |
| POST | `https://api.eu.apyhub.com/apyhub/csv-to-json/csv-url-json-url` | What it does Converts a CSV file from a public URL into JSON and returns a pre-signed S3 URL where… | 50 |
| POST | `https://api.eu.apyhub.com/apyhub/csv-to-json/csv-file-json-file` | What it does Converts an uploaded CSV file into a downloadable JSON file. The request sends a binar… | 50 |
| POST | `https://api.eu.apyhub.com/apyhub/csv-to-json/csv-raw-json-url` | What it does Converts raw CSV content in the request body into a JSON file and returns a pre-signed… | 50 |
| POST | `https://api.eu.apyhub.com/apyhub/csv-to-json/csv-url-json-file` | What it does Converts the CSV file located at the provided URL into a downloadable JSON file. The r… | 50 |
| POST | `https://api.eu.apyhub.com/apyhub/csv-to-json/csv-file-json-raw` | What it does Converts an uploaded CSV file into an inline JSON array. The request sends a binary fi… | 50 |
| POST | `https://api.eu.apyhub.com/apyhub/csv-to-json/csv-file-json-url` | What it does Converts an uploaded CSV file into a JSON file and returns a pre-signed S3 URL for the… | 50 |
| POST | `https://api.eu.apyhub.com/apyhub/csv-to-json/csv-raw-json-raw` | What it does Converts a raw CSV string in the request body into a JSON array. The response is an ar… | 50 |
| POST | `https://api.eu.apyhub.com/apyhub/csv-to-json/csv-raw-json-file` | What it does Converts raw CSV content sent in the request body into a downloadable JSON file. The r… | 50 |

## Endpoint reference

### Convert CSV at URL → inline JSON array

`POST https://api.eu.apyhub.com/apyhub/csv-to-json/csv-url-json-raw` · 50 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `url` | body | string (uri) | yes | Publicly accessible URL pointing to a CSV file. The endpoint validates that the response Content-Type is text/csv or text/plain; charset=UTF-8, or that the Content-Disposition header references a .cs… |

#### Quickstart

Convert a CSV file from a public URL into raw JSON by sending the CSV URL in the request body.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/csv-to-json/csv-url-json-raw" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.csv"}'
```

#### What you'll get back

Returns a JSON array of objects. Each array item is a JSON object, and the schema does not restrict the fields inside those objects.

```json
[
  { "name": "Alice", "age": 30 },
  { "name": "Bob", "age": 25 }
]
```

### Convert CSV at URL → S3 signed URL

`POST https://api.eu.apyhub.com/apyhub/csv-to-json/csv-url-json-url` · 50 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `url` | body | string (uri) | yes | Publicly accessible URL pointing to a CSV file. Example: `https://assets.apyhub.com/samples/sample.csv`. |
| `output` | query | string | no | Default: `sample-output`. Example: `my-converted-data`. |

#### Quickstart

Convert a CSV file from a public URL into JSON by sending the CSV URL in the request body.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/csv-to-json/csv-url-json-url?output=my-converted-data" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.csv"}'
```

#### What you'll get back

Returns a JSON object with a `data` string field. The `data` value is a pre-signed S3 URL to the converted file.

```json
{
  "data": "https://..."
}
```

### Convert uploaded CSV file → downloadable JSON file

`POST https://api.eu.apyhub.com/apyhub/csv-to-json/csv-file-json-file` · 50 atoms · accepts `multipart/form-data` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `file` | body | string (binary) | yes | CSV file to convert. |
| `output` | query | string | no | Default: `sample-output`. Example: `my-converted-data`. |

#### Quickstart

Upload a CSV file to convert it into a JSON file.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/csv-to-json/csv-file-json-file?output=my-converted-data" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.csv"
```

#### What you'll get back

Returns a downloadable JSON file as binary content containing the converted data.

### Convert raw CSV body → S3 signed URL

`POST https://api.eu.apyhub.com/apyhub/csv-to-json/csv-raw-json-url` · 50 atoms · accepts `text/plain` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `body` | body | string | yes | Raw CSV content. Example: `name,age
Alice,30
Bob,25`. |
| `output` | query | string | no | Default: `sample-output`. Example: `my-converted-data`. |

#### Quickstart

Convert raw CSV text to a JSON file by sending the CSV content in the request body.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/csv-to-json/csv-raw-json-url?output=my-converted-data" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: text/plain" \
  --data-binary $'name,age\nAlice,30\nBob,25'
```

#### What you'll get back

Returns a JSON object with a `data` string field, which is a pre-signed S3 URL to the converted file.

```json
{
  "data": "https://..."
}
```

### Convert CSV at URL → downloadable JSON file

`POST https://api.eu.apyhub.com/apyhub/csv-to-json/csv-url-json-file` · 50 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `url` | body | string (uri) | yes | Publicly accessible URL pointing to a CSV file. Example: `https://assets.apyhub.com/samples/sample.csv`. |
| `output` | query | string | no | Default: `sample-output`. Example: `my-converted-data`. |

#### Quickstart

Convert a CSV file from a public URL into a downloadable JSON file.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/csv-to-json/csv-url-json-file" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.csv"}'
```

#### What you'll get back

Returns a binary JSON file (`application/json`) containing the converted data.

```json
<downloadable file>
```

### Convert uploaded CSV file → inline JSON array

`POST https://api.eu.apyhub.com/apyhub/csv-to-json/csv-file-json-raw` · 50 atoms · accepts `multipart/form-data` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `file` | body | string (binary) | yes | CSV file to convert. Accepted MIME types: text/csv, text/plain, application/vnd.ms-excel, application/csv, application/octet-stream. |

#### Quickstart

Convert a CSV file to raw JSON by uploading it as `file`.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/csv-to-json/csv-file-json-raw" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.csv"
```

#### What you'll get back

Returns a JSON array of objects. Each item in the array is an object, and the schema allows additional properties on each object.

```json
[
  {
    "anyKey": "anyValue"
  }
]
```

### Convert uploaded CSV file → S3 signed URL

`POST https://api.eu.apyhub.com/apyhub/csv-to-json/csv-file-json-url` · 50 atoms · accepts `multipart/form-data` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `file` | body | string (binary) | yes | CSV file to convert. |
| `output` | query | string | no | Default: `sample-output`. Example: `my-converted-data`. |

#### Quickstart

Upload a CSV file to convert it and return a pre-signed URL for the JSON output.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/csv-to-json/csv-file-json-url" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.csv"
```

#### What you'll get back

Returns a JSON object with a `data` string field containing a pre-signed S3 URL to the converted file.

```json
{
  "data": "https://s3.amazonaws.com/..."
}
```

### Convert raw CSV body → inline JSON array

`POST https://api.eu.apyhub.com/apyhub/csv-to-json/csv-raw-json-raw` · 50 atoms · accepts `text/plain` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `body` | body | string | yes | Raw CSV content. Example: `name,age
Alice,30
Bob,25`. |

#### Quickstart

Send raw CSV text in the request body to convert it into JSON.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/csv-to-json/csv-raw-json-raw" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: text/plain" \
  --data-binary $'name,age\nAlice,30\nBob,25'
```

#### What you'll get back

Returns a JSON array of objects. Each array item is a JSON object, and the schema allows additional properties in each object.

```json
[
  { "name": "Alice", "age": 30 },
  { "name": "Bob", "age": 25 }
]
```

### Convert raw CSV body → downloadable JSON file

`POST https://api.eu.apyhub.com/apyhub/csv-to-json/csv-raw-json-file` · 50 atoms · accepts `text/plain` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `body` | body | string | yes | Raw CSV content. Example: `name,age
Alice,30
Bob,25`. |
| `output` | query | string | no | Default: `sample-output`. Example: `my-converted-data`. |

#### Quickstart

Send your raw CSV text in the request body to convert it into a downloadable JSON file.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/csv-to-json/csv-raw-json-file?output=my-converted-data" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: text/plain" \
  --data-binary $'name,age\nAlice,30\nBob,25'
```

#### What you'll get back

Returns a downloadable JSON file (`binary`) containing the converted data.

```json
<JSON file download>
```

## About

## What it does
CSV to JSON Converter turns CSV data into JSON, whether you send a raw CSV body, upload a CSV file, or point it at a publicly accessible CSV URL. You can receive the converted data inline as a JSON array, as a downloadable JSON file, or as a pre-signed S3 URL.

Use the inline JSON array endpoints when you want to parse tabular data directly in your app. Send raw CSV content, a CSV file, or a CSV URL, and get back an array of objects. Use the file and URL output variants when you need a downloadable JSON artifact or a temporary hosted link for downstream processing.

The inputs are simple: a `body` containing raw CSV text, a binary `file`, or a `url` to a CSV resource. For URL-based conversion, the source must be publicly accessible. For file uploads, the endpoint accepts CSV files and, in the raw-file variant, common CSV MIME types.

CSV to JSON Converter is a good fit for import pipelines, data normalization jobs, ETL steps, and tools that need to ingest spreadsheet exports into JSON-based systems.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/apyhub/service/csv-to-json
