OPML to JSON Converter
CV-65Paste an OPML file, such as an RSS reader export, and get JSON with the head details and every outline, including nested ones, with all their attributes.
Runs in your browser. Nothing is uploaded.
OPML
JSON
How to use it
- Paste the OPML into the input box, or open the .opml file and drop it on the box.
- Pick an indent, or Minified for one line.
- Check the outlines list in the result.
- Copy the JSON or download it as a .json file.
What the JSON contains
The result has version when the file gives one, head with each child of the head element as text, such as title and dateCreated, and outlines, a list of the outlines in the body. Every outline keeps all of its attributes under the same names, for example text, title, type, xmlUrl and htmlUrl. An outline that holds other outlines has them in its own outlines list, nested as deep as the file goes.
Values and entities
Everything is kept as a string, as in the file: nothing is turned into a number, boolean or date. Entities in attribute values, such as & in a feed name, are decoded to normal characters. Feed addresses are copied as text and the tool does not fetch or check them. If an outline carries an attribute that is literally named outlines, its children replace it.
What is skipped
Only direct children called outline are read in the body, and only the direct children of head are read. Other attributes on the root, and elements nested deeper inside head, are ignored. The file must be well formed XML with an opml root and a body. Comments and the XML declaration are dropped.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
The root element is <rss>, not <opml>. | The file is XML but not OPML; this example shows an RSS feed. | Paste an OPML file, which starts with an <opml> element. |
The OPML has no <body> element. | The file has an opml root but no body to read outlines from. | Add the body element that holds the outlines. |
Questions people ask
How do I convert OPML to JSON?
Paste the OPML and the JSON appears. Choose the indent and copy the result or download it. The outlines keep their nesting and all of their attributes.
Where are my feed URLs in the output?
In each outline, under the attribute name the file used, usually xmlUrl for the feed and htmlUrl for the site. They are copied as plain text.
Does it work with folders of feeds?
Yes. An outline that contains other outlines, like a category folder, has them under its own outlines key, so the folder structure is kept. Copy the result or download it with the buttons above the output.
Why is an outline missing from the result?
Only elements named outline directly under body, or inside another outline, are read. If your file uses a different element name, it is ignored. Everything runs in the page, so you can test with real data.
Can I make the JSON smaller?
Choose Minified to remove the indentation and line breaks. The content is the same, just on one line. If the output is not what you expect, check the input first.
About this tool
The output has version (when present), head (each child element of <head> as text, such as title), and outlines, a list holding every outline from <body>. Each outline keeps all of its attributes as strings with the same names, for example text, title, type, xmlUrl and htmlUrl, and outlines nested inside it appear under an outlines key (an attribute with that exact name would be replaced). Nothing is converted to numbers or booleans. Entities in attribute values are decoded. Only direct children named outline are read in the body, and only the version attribute of the root and the direct children of head are read; other attributes and nested head elements are ignored. The XML must be well formed, and the root must be <opml>. Nothing is fetched: feed addresses are copied as text and not checked.