HTML Entity Encoder/Decoder
Convert special characters such as <, >, &, quotes, and apostrophes into HTML entities, or decode entities back to readable text.
Runs locally in your browser. Your data never leaves your device.
Input
Or drop any file .html, .txt, .md · up to 2.0 MB. Read in your browser, never uploaded.
Output
Encode HTML before showing code as text, or decode entities back to readable characters.
How to encode and decode HTML entities
Convert characters that have special meaning in HTML into safe entities, or decode entity text back to readable characters.
When to encode entities
Encode entities when you need to show code as text, paste snippets into a CMS field, or prevent characters like < and & from being interpreted as markup.
How to use it
- Paste HTML, text, or entity-encoded content into the input box.
- Choose Encode to escape special characters.
- Choose Decode to turn entities back into readable text.
- Copy the output when it looks right.
Common uses
- Showing HTML snippets inside documentation.
- Preparing safe text for template examples.
- Cleaning copied content that contains visible entity codes.
Local conversion
Encoding and decoding run in your browser. The text is not uploaded.
HTML entity converter FAQ
- What characters are encoded?
- The tool encodes the characters most likely to break HTML text: &, <, >, double quotes, and apostrophes.
- Can it decode numeric entities?
- Yes. It supports common named entities and numeric decimal or hexadecimal entities.
- Does encoding sanitize unsafe HTML?
- No. It escapes text for display, but it is not a complete HTML sanitizer for untrusted markup.
