Documentation → features
File Conversion
CorsProxy can convert CSV, XML, and RSS to JSON on the fly.
Production plan required:
inputandoutputrequire a Production plan and a valid API key.
Convert to JSON
Explicit input format
https://corsproxy.io/?key=YOUR_API_KEY&url=https://example.com/data.csv&input=csv&output=json
https://corsproxy.io/?key=YOUR_API_KEY&url=https://example.com/data.xml&input=xml&output=json
https://corsproxy.io/?key=YOUR_API_KEY&url=https://example.com/feed.xml&input=rss&output=json
Auto‑detect input
If you only set output=json, CorsProxy will auto‑detect the input format:
https://corsproxy.io/?key=YOUR_API_KEY&url=https://example.com/data&output=json
CSV delimiter override
https://corsproxy.io/?key=YOUR_API_KEY&url=https://example.com/data.csv&input=csv&output=json&delimiter=;
Response content type is application/json;charset=UTF-8.
Common errors
- Invalid input:
inputmust becsv,xml, orrss. - Invalid output:
outputmust bejson. - Auto‑detect failed: if
output=jsonwithoutinputand the format can’t be detected.
Reading RSS and Atom entries
Conversion preserves the source XML inside { type, data }; it does not normalize feeds to an items array. RSS entries are in data.rss.channel.item. Atom entries are in data.feed.entry. One entry is an object; multiple entries are an array. XML attributes use _ prefixes (enclosure._url, link._href).
const params = new URLSearchParams({
key: 'YOUR_API_KEY', input: 'rss', output: 'json',
url: 'https://feeds.bbci.co.uk/news/rss.xml'
});
const response = await fetch('https://corsproxy.io/?' + params);
if (!response.ok) throw new Error('HTTP ' + response.status + ': ' + await response.text());
const { data } = await response.json();
const entries = data.rss?.channel?.item;
const items = entries == null ? [] : Array.isArray(entries) ? entries : [entries];
console.log(items);
For raw RSS or Atom XML, use Free or higher for browser requests, omit input and output, and read response.text(). Try a raw feed or test JSON conversion.
See the RSS & Feeds guide for complete JavaScript, React, RSS, and Atom examples.