HTML Entity Encoder / Decoder

Use this free HTML entity encoder and decoder to turn HTML characters into display-safe entity text or convert entity codes back to readable text.

All tools
Research-backed assumptions Formula steps Examples included Private in-browser use
Encoded entities
<strong>Free & fast</strong>

5 entities changed

Mode
encode
Input characters
28
Changed positions
43

Entity encoding helps display code examples as text. It is not a complete sanitizer for untrusted HTML.

Formula steps

  1. Find characters that need escaping in HTML text.
  2. Replace &, <, >, quotes, and apostrophes with entity text.
  3. Return copy-ready text without sending the snippet to a server.

How to use the html entity encoder / decoder

  1. Choose Encode when you need HTML characters shown as text.
  2. Choose Decode when you need readable text from entity codes.
  3. Paste the snippet and press Run HTML entity tool.
  4. Treat entity encoding as display help, not a full security sanitizer.

Common uses

Show HTML code examples inside a blog post, guide, or documentation page.

Decode copied entity text so it is easier to read.

Escape short snippets before placing them in visible HTML text.

Check whether a string changed after encoding or decoding.

Examples

Encode tag text <strong>Free & fast</strong>

&lt;strong&gt;Free &amp; fast&lt;/strong&gt;

Decode entities &lt;strong&gt;Tools&lt;/strong&gt;

<strong>Tools</strong>

Quote cleanup title="Calculator" data-label="A&B"

Encoded quote and ampersand text

Frequently asked questions

Plain-language answers about when to use the tool, what it does with your inputs, what to double-check, and how privacy works.

When should I use the HTML Entity Encoder / Decoder?

Use it when your task matches one of these common needs: Show HTML code examples inside a blog post, guide, or documentation page. Decode copied entity text so it is easier to read. It works best when you already know the values, dates, units, or settings the page asks for.

What is the HTML Entity Encoder / Decoder doing with my inputs?

In plain language: Encode mode replaces &, <, >, quotes, and apostrophes with HTML entities. Decode mode converts supported named and numeric entities back to characters. The examples on the page are there so you can compare your inputs with a filled-out calculation before copying the answer.

What do the main HTML Entity Encoder / Decoder inputs mean?

The main inputs are the values, text, dates, units, or settings the tool needs before it can work. Read each field label carefully, keep units consistent, and compare your entry with the examples if the answer looks strange.

How should I read the HTML Entity Encoder / Decoder answer?

Read the output next to your original input. If the tool changes format, units, encoding, spacing, or capitalization, compare a small sample before copying the whole result into another app.

What should I double-check before trusting the answer?

Entity encoding is useful for displaying code examples as text, but it is not a complete sanitizer for untrusted HTML or script content. Also check that you used the right unit, date, scale, or mode because small input changes can change the result.

Does the site save what I enter?

No. The calculator runs in your browser tab. Your recent answers stay only on the page while you use it, and they are not sent to a server.

Related tools