Remove HTML/XML tags from a string Use a regular expression to remove HTML/XML tags from a string. const stripHTMLTags = str => str.replace(/<[^>]*>/g, ''); // EXAMPLE stripHTMLTags('<p><em>lorem</em> <strong>ipsum</strong></p>'); // 'lorem ipsum' Source https://www.30secondsofcode.org/js/s/strip-html-tags