Introduction
The HTML Entity Encoder Decoder by Trencada is a free online tool that converts plain text into HTML entities and converts entities back into readable text. Whether you need to escape special characters so your HTML does not break, display code snippets safely on a web page, or decode entities copied from source code, this tool handles both directions with named, decimal, and hexadecimal output — instantly and without signing up.
How to Use the HTML Entity Encoder Decoder
- Choose a direction. Pick Encode → HTML entities or Decode → plain text from the Mode dropdown.
- Pick an entity format (encode mode). Select Named (&), Decimal (&), or Hexadecimal (&).
- Set the encode scope. Choose Special chars only (& < > " '), Special + non-ASCII, or Every character.
- Paste your text into the input box. Conversion happens live as you type, or press Convert.
- Copy the output with one click. Use Swap to flip the direction, Sample to load an example, and Reset to start over.
Key Features
- Encode and decode in one place — switch directions instantly or use Swap to reverse your latest result.
- Three entity formats — named, decimal, and hexadecimal entities.
- Flexible encode scopes — escape only special characters, include non-ASCII characters, or encode every character.
- Live conversion with stats — watch input characters, output characters, and entity counts update as you type.
- One-click copy and sample data — copy results instantly or load a built-in example to test the tool.
- 100% private — all processing happens in your browser; nothing is uploaded or stored.
Why Choose Trencada
Trencada tools are built for speed, simplicity, and privacy. The HTML Entity Encoder Decoder works entirely in your browser, so your code and content never leave your device — no accounts, no uploads, no waiting. It pairs perfectly with our URL Encoder for escaping URLs, the Base64 Encoder for data encoding, the JSON Formatter for cleaning up JSON, and the Character Counter for checking text length.
Frequently Asked Questions
What is the difference between named, decimal, and hexadecimal entities?
Named entities use readable names such as & for & and © for ©. Decimal entities use character codes like &, and hexadecimal entities use hex codes like &. All three render the same character in the browser — pick whichever format your workflow requires.
Which characters should I encode in HTML?
At minimum, encode &, <, >, ", and ' whenever inserting text into HTML, so it does not break your markup or open the door to script injection. Encoding non-ASCII characters like € or — is useful when your page character set does not support them.
Is it safe to paste my code into this tool?
Yes. The tool is 100% client-side — your text is processed entirely in your browser and never sent to any server. Trencada never sees, stores, or shares it.