Calculator
What the HTML Tag Remover does
HTML Tag Remover: calculates Plain text from HTML, Decode entities (& to &) and Keep line breaks for block elements. Example: decode entities (& to &) Yes, keep line breaks for block elements Yes and keep link urls in brackets No gives plain text Hello & welcome This is bold and a link. Line two here. - One - Two.
Give the HTML Tag Remover your HTML, Decode entities (& to &), Keep line breaks for block elements and Keep link URLs in brackets and it works out Plain text. Change any input and the output follows immediately.
Small formatting chores add up; automating them saves real time. That is usually what brings someone tidying data pulled out of a PDF here.
The work is done by JavaScript already loaded in your browser, so your input never crosses the network.
The field table, the method and a worked example are documented after the tool for anyone who wants to check the working.
What do the HTML Tag Remover fields mean?
The HTML Tag Remover uses 4 inputs. None of the boxes start empty. The page loads with a worked set of values you can edit or replace.
| Field | What to enter | Default |
|---|---|---|
| HTML | paste or type any amount of text | <article> <h1>Hello & welcome</h1> <p>This is <strong>bold</strong> and <a href="/x">a link</a>.<br>Line two here.</p> <script>alert(1)</script> <ul><li>One</li><li>Two</li></ul> </article> |
| Decode entities (& to &) | choose from Yes or No | Yes |
| Keep line breaks for block elements | choose from Yes or No | Yes |
| Keep link URLs in brackets | choose from Yes or No | No |
How does the HTML Tag Remover work?
Each output is derived from the inputs above in a single pass; there is no hidden state carried between runs, so the same inputs always give the same calculation.
If something is off you are told which field, not given a generic failure.
Worked example
These are the values the HTML Tag Remover loads by default, and the result it produces from them. Open the tool above and you will find precisely these figures already in place.
| HTML | <article> <h1>Hello & welcome</h1> <p>This is <st… |
|---|---|
| Decode entities (& to &) | Yes |
| Keep line breaks for block elements | Yes |
| Keep link URLs in brackets | No |
| Plain text | Hello & welcome This is bold and a link. Line two here. - One - Two |
|---|
How to use it
- Paste your content into HTML.
- Pick a value for Decode entities (& to &): the options are Yes or No.
- Pick a value for Keep line breaks for block elements: the options are Yes or No.
- Pick a value for Keep link URLs in brackets: the options are Yes or No.
- Results update continuously rather than on submit.
- Check Plain text on the right.
- Use Copy Link if you want the same setup again later, or Print for a paper copy.
What this tool does not do
- Word and character definitions vary between tools: this one counts whitespace-separated tokens.
- It handles the common case well and the unusual case literally.
Frequently asked questions
HTML, Decode entities (& to &), Keep line breaks for block elements and Keep link URLs in brackets, nothing else. Each field is pre-filled with a sensible default, so the form is usable immediately, without filling anything in first.
With the values loaded when the page opens, plain text comes out as Hello & welcome This is bold and a link. Line two here. - One - Two. Nudge one field at a time to see which one the answer is most sensitive to.
No. Your browser is doing the computing, so we could not see the values even if we wanted to.
Free for any use, personal or commercial.
The formula is shown above precisely so you do not have to take the accuracy on trust.