HTML Entity Encoder & Decoder

Escape text to HTML entities or decode them back. Runs entirely in your browser.

📖 Read the guide: How to Encode HTML Entities →

Input
Output

How it works

1
Pick a mode
Encode turns special characters into entities; decode turns entities back into text.
2
Enter your text
Type or paste the content to convert.
3
Optional: all non-ASCII
Tick the box to also escape accented and non-Latin characters as numeric entities.
4
Copy
Copy the safe output into your HTML.

Frequently Asked Questions

To display characters like <, > and & literally instead of letting the browser treat them as markup — and to prevent injection when showing user text.

By default &, <, >, " and ’. Enable “all non-ASCII” to also encode accented and non-Latin characters.

No — it is encoded and decoded in your browser.

Encode and decode HTML entities online for free. Convert characters such as &, <, >, " and ’ into their entity equivalents so they display literally and can’t break your markup, or decode entities back to plain text. Optionally escape every non-ASCII character as a numeric entity for maximum compatibility. It is handy for safely showing code, user content and special symbols, and it all runs in your browser.