HTML Entities Encoder / Decoder

Convert special characters to HTML entities and back

Your files never leave your browser. Nothing is uploaded to any server. Privacy Policy

Special characters like <, >, & and " need to be escaped as HTML entities (&lt;, &gt;, &amp;, &quot;) when displayed inside HTML. This tool encodes any string to entity form and decodes entities back to their original characters — useful for safely displaying user input or copying code snippets into HTML.

How to encode HTML entities

1
Paste your text

Enter any string containing characters that need to be HTML-safe.

2
Choose encode or decode

Encode replaces special characters with entities, decode reverses it.

3
Copy the result

Use the Copy button to grab the safe HTML string.

🔁
Encode & decode

Convert text to HTML entities or back to plain characters in one click.

🔢
Numeric & named

Choose between named entities (&amp;) or numeric (&#38;) output.

🌐
Unicode-safe

Works with emoji and non-Latin characters using numeric character references.

🔒
Local only

Encoding runs entirely in your browser — no data leaves your device.

FAQ

HTML entities are escape sequences such as &lt; or &amp; used to represent characters that have special meaning in HTML.

Whenever you display user-submitted content in HTML — encoding prevents script injection (XSS) and renders the text correctly.

Named entities (&amp;) are easier to read; numeric entities (&#38;) work for any Unicode character including emoji.

Yes. Emoji and other Unicode characters are encoded as numeric references like &#128512;.

No. HTML encoding is for HTML markup; URL encoding (percent encoding) is for URLs. They use different rules.

More free tools