Skip to content
Schedule a Call

Encode or decode HTML entities

Encode special characters to HTML entities or decode entities back to text, with named, decimal or hex formats and a reference table. Free tool.

  • Files never leave your device
  • Free, no sign-up
  • No watermark
Loading tool…

About HTML Entity Encoder

Escape text so it displays safely in HTML, or turn entities back into readable characters. Choose named entities such as & for readability, or decimal and hexadecimal entities for maximum compatibility, and optionally encode every character. A reference table of common entities is included. It is useful for code samples in blog posts, email templates and preventing broken markup.

How to use HTML Entity Encoder

  1. 1

    Paste your text.

  2. 2

    Choose encode or decode.

  3. 3

    Pick named, decimal or hex format.

  4. 4

    Copy the output.

Why use this tool

  • Encode and decode modes.
  • Named, decimal and hex entities.
  • Encode-all option.
  • Common entities reference.
  • Live output.

Frequently asked questions

Characters such as < and & have special meaning in HTML. Encoding them shows them as text instead of markup.

Encoding user content before inserting it into HTML is a key defence, but frameworks and context-aware escaping matter too.

Named entities are easier to read; numeric ones work for every character.

Encode the code sample, then place it inside pre and code tags.

Yes. Emoji can be encoded as numeric entities.

No. Everything is processed in your browser tab. Nothing you type or paste is sent to CodeMites or any other server.

Yes. There is no account, no watermark and no usage limit. The tool runs in your own browser, so there is no server cost to charge you for.

Yes. It runs in any modern browser on Android and iOS as well as on Windows, macOS and Linux, with nothing to install.

Yes, once the page has loaded. Everything runs in your browser, so you can keep working on a train or plane without a connection.

At minimum &, < and > in text, and quotes inside attribute values.