RSS to JSON Converter: Feed Parser for Atom & RSS 2
RSS, Atom, and RDF feeds are XML documents, and every JavaScript app that wants feed data ends up writing the same parsing code. JSON is easier to map onto components and pass between services, so converting once beats parsing XML on every device. This page reads a feed you paste or load from a file and prints structured JSON with channel metadata, an items array, and warnings about missing fields. The file you select never leaves your machine: parsing runs entirely in the browser with the built-in DOMParser.
Parse a Feed into JSON
| Title | Published | Link |
|---|
How It Works
The util sends your input to DOMParser in XML mode first. On a parsererror, usually from a raw ampersand or an unclosed tag, a second pass runs in lenient HTML mode and a warning records that the file was not strict XML. Field pickup is namespace-agnostic: tag names are matched after the prefix is stripped, so a channel title, a dc:creator author, and a media:content image are all found the same way.
RSS 2 items are read for title, link, guid, pubDate (with dc:date and updated as alternates), description, categories, and enclosure URLs, and the first image enclosure also becomes the item image. Atom entries are read for title, id, the alternate link href, published or updated, summary, content, and author names, with iTunes tags collected when present. feedToJson then emits format, title, link, description, language, copyright, generator, lastBuildDate, itemCount, and the items array. Issues stay in the panel rather than the JSON, so the download holds feed data only.
Before and After
A two-item RSS 2 feed, the JSON head the converter prints, and the line a malformed file produces:
<rss version="2.0">
<channel>
<title>Daily Notes</title>
<link>https://example.com/</link>
<item>
<title>First post</title>
<link>https://example.com/first</link>
<pubDate>Mon, 12 Jan 2026 08:00:00 GMT</pubDate>
</item>
<item>
<title>Second post</title>
<link>https://example.com/second</link>
</item>
</channel>
</rss>
→ JSON output:
{
"format": "rss2",
"title": "Daily Notes",
"itemCount": 2,
"items": [
{
"title": "First post",
"link": "https://example.com/first",
"pubDate": "2026-01-12T08:00:00.000Z"
},
...
]
} Issues
document: The input could not be parsed as XML or HTML. Use Cases
| Team | Situation | What the JSON gives you |
|---|---|---|
| Mobile app team | Ingesting a partner feed inside a client app | One items array with title, link, and pubDate ready for list rows; the format field covers RSS and Atom alike |
| Content dashboards | Pulling several feeds into a single reporting view | itemCount and lastBuildDate sit beside the title, so widgets can show freshness without re-parsing |
| CMS migration | Moving a site's reading list off live RSS | Download feed.json per source and load the files into an importer without writing a parser |
Common Mistakes
- Calling fetch() on a feed URL from the page and hitting CORS. Most hosts never send Access-Control-Allow-Origin, so the request fails before parsing. Save the XML and paste it here instead.
- Assuming Atom entries carry pubDate. Atom uses published and updated, which the util maps into pubDate while keeping the original in dateRaw. A blank pubDate beside a filled dateRaw is normal.
- Hand-editing the JSON and breaking dates. pubDate values are ISO strings from Date, and rewriting one can still look fine until a sort compares it against the rest.
- Treating a lenient-mode warning as a clean parse. That warning means the XML was malformed, so fix the generator before shipping the file.
- Skipping the issues panel. Missing titles, links, and dates are listed there, and readers misbehave when those fields are empty.
Best Practices
- Run the source through the RSS Feed Validator first, so the converter is not hiding a generator bug under a working JSON file.
- Leave pretty-printing on while you review, then clear the box when you want a minified export.
- Re-parse after the upstream generator changes. A theme swap often drops pubDate or renames the title, and the issues panel shows it.
- Use the download button to keep a dated snapshot beside the code that consumes it, which makes diffing two exports easy.
- Keep both pubDate and dateRaw when you store items, so the publisher’s original text stays available.
Frequently Asked Questions
Which feed formats can this converter read?
RSS 2.0 is the main path, and other RSS versions are read with 2.0 rules plus a warning. Atom is found by its feed root and RDF by the rdf root, where items sit beside the channel. The badge shows the result, and Unknown means no feed element was found.
Does my feed file leave the browser?
No. The file input reads the selected file through the File API and drops its text into the input box, so the bytes are never uploaded. Parsing and export run from this page’s own script, and closing the tab discards everything.
Why is the issues list missing from the JSON output?
feedToJson builds a clean object with feed metadata and the items array only, so the downloaded file holds data and nothing else. Warnings stay in the panel beside the output where you can act on them. Fix the source feed and parse again for a clean export.
What is the difference between pubDate and dateRaw?
pubDate holds an ISO 8601 string that JavaScript produced after reading the original text. dateRaw keeps the publisher’s string exactly as written, and it remains even when the date cannot be read at all. Storing both fields costs almost nothing.
How are Atom entries mapped onto the item shape?
An entry title, the alternate link href, and the id element become title, link, and guid. Published is preferred for the date, with updated used when published is missing, and both land in pubDate and dateRaw. Summary becomes description, and author names fill the authors array.
Why did my feed get a lenient-mode warning?
Some publishers emit raw ampersands or leave tags unclosed, which strict XML rejects. The parser retries through DOMParser in HTML mode and records a warning, so the result is not mistaken for a clean XML read. Fixing the generator is the lasting answer.
Can I convert a feed with thousands of items?
Yes. Every item is parsed, the table shows the first 25 rows with a line counting the rest, and the JSON output includes the full array. Pretty-printing a very large feed can take a moment, so clear the pretty box when the page feels slow.