HTML entity encoder and decoder

Convert special HTML characters to entities or decode entities back into readable text.

Runs in your browser. Nothing is uploaded.

How to use it

  1. Paste text or HTML entities into the input box.
  2. Choose Encode to escape special characters, or Decode to turn entities back into text.
  3. Copy the result.

About this tool

HTML entities represent special characters with text codes. For example, < represents a less-than sign. Encoding helps display text containing angle brackets and ampersands as text in an HTML document.

This tool encodes ampersands, angle brackets, quotation marks and apostrophes. It only converts text; it does not sanitize HTML for use in every programming context. Always use the escaping method recommended by your framework.

Your input is processed locally in your browser and is never uploaded.

Questions

Which characters are encoded?

Ampersands, less-than and greater-than signs, double quotes and apostrophes are converted to HTML entities.

Does encoding HTML make it safe?

It helps display plain text instead of interpreting these characters as markup, but it is not a replacement for context-aware output escaping in your application.

Related tools