When you actually need this
If you want a browser to display HTML tags as visible text - in a code sample on a blog post, or inside a textarea default value - the angle brackets and ampersands need to be converted to their entity forms (<, >, &) first. Without that step, the browser tries to parse the text as real markup instead of showing it as a literal string, which is a common source of broken-looking code snippets on the web.
Why unencoded code snippets break on a live page
A browser reading raw HTML has no way to distinguish a literal less-than sign you want displayed from the start of an actual tag - without encoding, pasting a code example like <div class="box"> directly into a page causes the browser to try rendering an actual (empty, broken) div element instead of showing the text of the example itself.
Encoding versus decoding - picking the right direction
This tool converts readable characters into their safe entity form. If you instead have text that's already entity-encoded (showing < where you want a literal < to display) and need to reverse that, the companion HTML Decoder tool on this site handles that opposite direction.
How this differs from URL encoding
HTML encoding escapes characters that are special in HTML markup (like < and &); URL encoding escapes characters that are unsafe inside a URL (like spaces and & in a query string). They solve different problems for different contexts - using the wrong one for your context (encoding for a URL when you actually need HTML-safe text, or vice versa) will produce output that still doesn't work correctly in the place you're trying to use it.