Skip to content
NMSnabbit.

XML to Text Converter

Strip XML tags and keep only the readable text content.

Converters Runs in your browser

How do you convert XML to text?

Sometimes you want what an XML file says, not how it is structured. This tool deletes tags, attributes and comments, decodes &, < and numeric character references, and prints each element’s text on its own line. An RSS feed becomes readable paragraphs; a sitemap becomes a bare list of URLs. Nothing else is touched.

How to use the XML to Text

  1. 1 Feed in the XML markup, comments and all.
  2. 2 Tags and attributes vanish, leaving one line per element’s text.
  3. 3 Check that entities such as & decoded correctly.
  4. 4 Copy the extracted content.

What you can use it for

  • Pulling readable copy out of an XML document.
  • Extracting text from an RSS or sitemap file.
  • Removing markup before word-counting content.
  • Reducing XML to its plain content.

Frequently asked questions

Is any element text lost?
No. Everything between tags is kept and printed line by line; only the markup, attributes and comments disappear.
Can I get attribute values too?
Not here. Attributes are stripped with their tags. For structured extraction including fields, run the same XML through the XML to CSV converter.
How are entities treated?
The five predefined XML entities plus numeric character references decode to real characters, so & prints as & rather than as five characters of markup.

Related tools

More Converters

More tools like this:

All Converters