You wrote a line of text with an angle bracket in it, and the published page shows < instead. Or you copied a snippet that arrived full of &, > and ©, refusing to read like English. Nothing is corrupted. You are looking at HTML entities that were displayed rather than interpreted, and once you understand the two-step that produces this, the fix takes about ten seconds with the free HTML Entity Encoder/Decoder on Ovatly.

Contents

  • Quick answer
  • What < and > actually are
  • The double-display: how encoded text ends up printed
  • How to decode the text, step by step
  • Worked example: decoding one sentence piece by piece
  • When not to decode
  • Limitations and honest notes
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

&lt; is the HTML entity for the less-than character <, and &gt; is the entity for >. Browsers are supposed to read the entity and print the character. When you see the code itself on a page, the encoded text was displayed as literal text instead of being parsed as HTML, so the swap never happened. To recover the plain text, paste it into the HTML Entity Encoder/Decoder and press Decode entities: &lt;, &amp;, numeric entities and common named entities all turn back into characters.

What &lt; and &gt; actually are

An HTML entity is a stand-in: a short code that tells the browser to print a character that would otherwise be ambiguous or impossible to type. The less-than sign is the classic case. In HTML, < starts a tag, so a browser reading it expects markup to follow. To show a less-than sign as ordinary text, the page must use the entity &lt; instead, which the browser renders as < for the reader while never mistaking it for code.

The same arrangement covers a small family of characters. &gt; stands for >, &amp; for &, &quot; for the double quote and &#39; for the single quote. These are the five characters the encoder escapes, because they are the ones that matter for safety and correctness inside a page. Beyond them sit the named entities for symbols, like &copy; for ©, and the numeric forms, decimal like &#169; and hex like &#xA9;.

So the codes in your text are not damage. They are instructions, written for a browser, that ended up in front of a human.

The double-display: how encoded text ends up printed

The mix-up needs two steps. First, the text gets encoded, quite correctly, so it can travel or be stored safely: brackets become &lt; and &gt;, ampersands become &amp;. Second, something displays that encoded text as literal text, printing the codes instead of handing them to a browser to interpret. The reader sees the instructions rather than the result.

Three places produce this constantly. A CMS field that escapes its content on output will print whatever entities were already stored, doubling the protection into a visible mess. An email, especially in plain text, has no HTML parser in the reading path, so entities copied from a web page arrive as raw codes. And a page that prints its own source shows the encoded form because showing code was the point, until it was not.

Recognising the pattern is the whole diagnosis. If the text reads perfectly except that every bracket, ampersand, quote and symbol appears as a code, you are looking at encoded text shown as text. The content is intact; only the last interpretation step went missing.

How to decode the text, step by step

  1. Copy the entity-riddled text exactly as it appears, codes and all.
  2. Paste it into the HTML Entity Encoder/Decoder.
  3. Press Decode entities to turn &lt;, &amp;, numeric entities and common named entities back into characters.
  4. Read the output and confirm the brackets, quotes and symbols now appear as themselves.
  5. Copy the result from the output box and paste it where the readable text belongs.

The conversion runs locally in your browser, so the text is never uploaded. That makes it safe for drafts and snippets from private pages.

Worked example: decoding one sentence piece by piece

Take a short code-flavoured sentence that arrived in encoded form:

Use the &lt;strong&gt; tag when 5 &gt; 3 &amp; the price is &pound;25.

Decode it one entity at a time and each piece resolves plainly:

  • &lt; becomes <, and the matching &gt; becomes >, so the tag name reads as <strong> again, as text describing a tag rather than as markup.
  • The standalone &gt; in the comparison becomes >, restoring the sense of the inequality.
  • &amp; becomes &, a plain ampersand joining the two clauses.
  • &pound; becomes £, the pound sign in front of the price.

The finished sentence reads:

Use the <strong> tag when 5 > 3 & the price is £25.

That is the same behaviour the tool's own example shows at smaller scale: decoding &lt;p&gt; &amp; &#169; gives back <p> & ©, three different entity styles, named, numeric and bracket, all resolved in one pass.

When not to decode

Decoding is for reading and for republishing as text. It is not automatically the right move. If the text is going back into an HTML page as markup, the encoded form may be exactly what the page needs: a code sample inside a page must keep its &lt; entities, or the browser will treat the sample as real tags and the example will vanish into the layout. The same applies to documentation, where the entity often is the content being taught.

So the question is never "does this text contain entities" but "who reads it next". A human reading prose wants characters. A browser rendering a page wants entities wherever a character could be mistaken for markup. Decode for the first audience, keep the codes for the second.

Limitations and honest notes

The decoder understands common named entities, decimal entities and hex entities. Obscure named entities are left as they are. In a long document, expect the everyday codes to resolve and a rare named entity to survive untouched; that survivor needs a manual lookup rather than a second decode pass, which will leave it unchanged again.

Decoding also cannot tell you why the double-display happened. It repairs the text you have, not the CMS setting, template or export step that produced it. If fresh content keeps arriving encoded, the lasting fix sits in that pipeline.

One more boundary, in the other direction: encoding is not a security filter on its own. Escaping the five characters makes text display as text, but real applications still escape output in the right context, attribute, script or URL, as their own step.

Common mistakes

  • Decoding twice. Running already decoded text through again changes nothing useful, and if the text legitimately contains an entity as content, a second pass can strip the very code you meant to keep.
  • Pasting decoded code samples back into a page as-is. The browser will act on the brackets instead of showing them. Samples that demonstrate markup need their entities.
  • Fixing the symptom in the wrong place. Decoding one article by hand helps that article. If every export arrives encoded, correct the field or template that double-displays.
  • Assuming a surviving entity means the decode failed. Obscure named entities are left as they are by design; check for them before assuming the tool missed something common.
  • Treating the codes as corruption and retyping the text. The characters are all still there, encoded. One decode pass restores them exactly.

FAQs

Why does my < show as &lt; in the page source? Because that is the point: &lt; tells the browser to display a less-than sign as text instead of starting a tag. Your readers see <, the browser sees an instruction to print it. It only looks wrong when the encoded form itself gets printed as text.

What causes &lt; to appear on the page itself? Double-display: the text was encoded once so it could be shown safely, and then the encoded version was treated as plain text and printed, often by a CMS field, an email or a page that outputs the source. The browser never got the chance to interpret the entities.

How do I turn &lt; back into <? Paste the text into the HTML Entity Encoder/Decoder and press Decode entities. It turns &lt;, &amp;, numeric entities and common named entities back into characters, locally in your browser.

Should I always decode text that contains entities? No. Decoding is for reading and republishing as text. If the text is going back into an HTML page as markup, the encoded form may be exactly what the page needs so the browser displays the characters instead of acting on them.

Why did one entity survive decoding unchanged? Decoding understands common named entities, decimal entities and hex entities. Obscure named entities are left as they are, so a rare name passes through while the rest of the text decodes.

Conclusion

Seeing &lt; and &gt; in your text means encoded instructions were printed instead of interpreted: the content is fine, and one decode pass with the HTML Entity Encoder/Decoder restores the characters your readers were meant to see. When the text you are cleaning also contains symbols written as entities, the companion reference on HTML entities for copyright, trademark and currency symbols lists the codes worth knowing. For more tools and guides like this one, browse the developer tools guides.