HTML Encoder & Decoder
Escape HTML characters into entities, or turn entities back into plain characters.
Enter your details below.
How to use
- Type or paste the text or snippet.
- Choose Encode or Decode.
- Press the button and read the converted text.
About this tool
In HTML, characters like angle brackets and ampersands mark up the page rather than displaying as text, so showing them literally requires entities such as the ones for less-than and ampersand. This tool escapes the five common characters, and reverses the process for decoding. It works on short snippets of text and markup; it does not parse a full document, validate HTML, or sanitise unsafe content, so it is a formatting aid, not a security filter.
Frequently asked questions
Which characters get escaped?
Ampersand, less-than, greater-than, double quote and single quote. Those are the characters most likely to be read as markup instead of text.
Does encoding make untrusted HTML safe?
Not on its own. Encoding helps display text literally, but deciding what content is safe to publish needs proper handling in your application, not just this converter.