<>

HTML Entity Encoder

Escape or unescape HTML entities safely.

html-entity-encoder.tool
Result will appear here
Nothing you paste here is ever sent to a server.
Overview

What is a html entity encoder?

This tool escapes special characters into HTML entities (like & into &) or decodes entities back into readable text - useful whenever raw text needs to be safely displayed inside HTML without being interpreted as markup.

Quick start

How to use this tool

  1. 1Choose Encode or Decode.
  2. 2Type or paste your text.
  3. 3The result updates instantly - use Swap to flip direction.
  4. 4Copy the result.
Where it helps

Common use cases

Safely displaying user-submitted text inside an HTML page without it being interpreted as markup
Decoding HTML entities found in scraped or copied web content
Preparing code snippets containing < and > to be shown inside a web page
Debugging why text with special characters is rendering incorrectly
Good to know

Frequently asked questions

Which characters get encoded?

The five characters with special meaning in HTML: &, <, >, ", and '.

Does it decode numeric entities too?

Yes - both decimal (&#39;) and hexadecimal (&#x27;) numeric character references are decoded, along with named entities.

Is this the same as URL encoding?

No - HTML entity encoding protects text from being interpreted as HTML markup, while URL encoding protects text used inside a URL. They solve different problems.

Is my data sent anywhere?

No - encoding and decoding happen entirely in your browser.

quick_facts.json

{

"runs_in_browser": true,

"data_sent_to_server": false,

"signup_required": false,

"price": "free",

"category": "Encoding"

}

Related tools

B64
No signup
Base64 Encoder

Encode text to Base64, with correct Unicode handling.

Open tool
B64
No signup
Base64 Decoder

Decode Base64 back to readable text, with correct Unicode handling.

Open tool
URL
No signup
URL Encoder

Percent-encode URLs and query strings, component or full-URI mode.

Open tool