HTML Entity Encoder/Decoder

Convert special characters to HTML entities and decode HTML entities back to readable text in your browser.

Plain text input

Paste text to make special characters safe for HTML source.

Processed locally in your browser. Limit Plain text Your input is processed in your browser and is not uploaded or sent to a server. Avoid pasting production secrets, access tokens, private keys, passwords, or sensitive customer data unless you understand the risk.
0 input characters0 warnings

Encoded entities

Read-only plain text. Decoded HTML is not rendered or executed.

Output appears here as you type.
ModeEncode
Input length0
Output length0
Encoded0
Warnings0

What are HTML entities?

HTML entities are text escape sequences that represent characters in HTML source. They are useful when a character could be mistaken for markup, such as <, >, or &.

HTML entity encoding vs decoding

Encoding turns plain characters into entity text. Decoding reverses supported entity text back to readable characters while preserving unknown or invalid entities with warnings.

Named entities vs numeric entities

Named entities use memorable labels like &amp;. Numeric entities use Unicode code points, such as decimal &#169; or hexadecimal &#xA9;.

Common HTML entities

Common examples include &amp; for ampersand, &lt; for less-than, &gt; for greater-than, &quot; for double quote, &apos; for apostrophe, and &nbsp; for a non-breaking space.

When to encode HTML characters

Encode text before placing it inside HTML source, templates, examples, or documentation where user-provided text should remain text instead of becoming tags, attributes, or entity syntax.

HTML Entity Encoder vs URL Encoder

HTML entity encoding is for HTML source text. URL encoding is for addresses, query parameters, and form values. A space, ampersand, or slash may need different treatment depending on where the value is used.

FAQ

Does this HTML Entity Encoder upload my text?

No. Encoding, decoding, warnings, copy actions, and downloads run locally in your browser.

What does &amp; mean?

&amp; is the named HTML entity for an ampersand character. Encoding ampersands prevents them from starting another entity accidentally.

What is the difference between HTML encoding and URL encoding?

HTML encoding protects text inside HTML source. URL encoding prepares values for URLs and query strings, using percent escapes such as %20.

Should I encode all characters or only unsafe HTML characters?

Most HTML text only needs unsafe characters encoded. Encoding every character can be useful for demos or strict transport formats, but it makes source harder to read.

Can this decode numeric entities?

Yes. Decimal entities like &#169; and hexadecimal entities like &#xA9; can be decoded.

Does decoding entities render HTML?

No. Output is displayed as escaped plain text. This tool does not insert decoded HTML into the page or execute scripts.