🧩

XML to JSON (URL)

Convert a remote XML URL to a downloadable JSON file.

GET 1 credit /v1/convert/xml-to-json-file
curl -OJ "https://convert.toolkitapi.io/v1/convert/xml-to-json-file?url=https://toolkitapi.io/feed.xml"
import httpx

resp = httpx.get(
    "https://convert.toolkitapi.io/v1/convert/xml-to-json-file?url=https://toolkitapi.io/feed.xml",
)
print(resp.json())
const resp = await fetch("https://convert.toolkitapi.io/v1/convert/xml-to-json-file?url=https://toolkitapi.io/feed.xml", {
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
Binary JSON file streamed as a download (Content-Type: application/json)

Description

Convert a remote XML URL to a downloadable JSON file.

How to Use

1

1. GET with the XML `url`.

2

2. Optionally set `strip_namespaces`, `force_list`, and `filename`.

3

3. Save the streamed JSON.

About This Tool

Fetches an XML document from a public URL and streams back a JSON file. URL-based counterpart to [XML to JSON](/convert/tools/xml-to-json).

Why Use This Tool

Frequently Asked Questions

Are attributes preserved?
Yes — as `@`-prefixed keys.
What encoding is expected?
UTF-8 is preferred. UTF-16 with BOM is auto-detected.
Large XML?
Input size is capped at the server-configured limit. Use async jobs for multi-MB documents.

Start using XML to JSON (URL) now

Get your free API key and make your first request in under a minute.