Convert RSS to JSON with a predictable structure
Feeds are still one of the simplest ways to syndicate blog posts, release notes, podcasts and news, but working with them in code means dealing with XML and with several feed dialects. This RSS to JSON converter reads RSS 2.0, Atom and RSS 1.0 (RDF) feeds and returns JSON in one consistent layout: a few fields describing the feed and an items array, always an array even when the feed has a single entry.
Example: RSS 2.0
<rss version="2.0">
<channel>
<title>Northwind Engineering Blog</title>
<link>https://blog.example.com</link>
<item>
<title>Validating XML at the edge</title>
<link>https://blog.example.com/xml-validation</link>
<pubDate>Thu, 02 May 2024 15:30:00 GMT</pubDate>
<category>XML</category>
</item>
</channel>
</rss>
{
"type": "rss",
"version": "2.0",
"title": "Northwind Engineering Blog",
"link": "https://blog.example.com",
"items": [
{
"title": "Validating XML at the edge",
"link": "https://blog.example.com/xml-validation",
"pubDate": "Thu, 02 May 2024 15:30:00 GMT",
"category": "XML"
}
]
}
How each feed format is normalized
- RSS 2.0 – channel elements (title, link, description, language and so on) become top-level fields next to
type: "rss"and theversionattribute; each<item>becomes an element ofitems. - Atom –
typeis"atom". The feedtitle,linkandupdatedare pulled out as plain values. Atom links are elements with anhrefattribute, so the converter picks thealternatelink (or the first one) and gives you the URL string. Entries becomeitemswithtitle,link,summaryandcontentas plain text. - RSS 1.0 / RDF –
typeis"rss1", with channel fields and theitemelements asitems.
Attributes and extensions
Elements that carry attributes keep them with an @ prefix. A podcast enclosure, for example, becomes:
"enclosure": {
"@url": "https://ex.com/a.mp3",
"@length": "123",
"@type": "audio/mpeg"
}
and <guid isPermaLink="false">abc</guid> becomes an object with "@isPermaLink" and "#text". Namespaced extensions such as dc:creator, content:encoded or iTunes tags keep their prefixed names as keys. All values are kept as strings, which avoids surprises with IDs and dates; convert dates in your own code.
Loading a live feed
Load URL fetches the feed through our server, which avoids the cross-origin restrictions browsers apply to most feed URLs. The downloaded XML is then placed in the editor and converted in your browser. If a site blocks automated requests or requires a login, save the feed from your browser and upload the file instead.
Common errors
This XML is not an RSS or Atom feed– the document root is not<rss>,<feed>or<rdf:RDF>, for example because the URL returned an HTML page.Invalid RSS: …with a line number – the feed is not well-formed XML, often because of an unescaped&in a title.
Related tools
To read a feed as a formatted list of articles rather than data, use the RSS feed viewer. For subscription lists exported from feed readers, try OPML to JSON, and for general XML documents, XML to JSON.
Privacy
Conversion runs in your browser. Load URL sends the feed address to our server so it can fetch the feed, and Save & Share stores the content if you create a link.