← Back to tools

HTML Entity Encoder / Decoder

Encode special HTML characters into entities or decode entities back to text.

Feedback

Was this tool useful?

Overview

Encode special characters into HTML entities and decode entities back to plain text. Essential for safely displaying code snippets, user input, and markup examples in web pages.

How to use

  1. Paste text containing special characters or HTML entities.
  2. Click Encode to convert characters like < > & into entities, or Decode for the reverse.
  3. Copy the converted result.

Examples

Notes

FAQ

Why encode HTML entities?
Characters like <, >, and & have special meaning in HTML. Encoding them makes browsers display them as text instead of interpreting them as markup.
Does this prevent XSS by itself?
Encoding output is one important layer. Combine it with proper templating, validation, and a Content Security Policy.
Is my text uploaded?
No. Encoding and decoding run entirely in your browser.

Embed this tool

Paste this iframe into any HTML page to embed HTML Entity Encoder / Decoder on your site:

Related Tools