HTML Text Encoder & Decoder

Turn special characters into HTML entities so they render literally — or decode entities back to text.

  • Encoders & Formatters
  • Free
  • No sign-up
Input
Auto encode
Result
The encoded or decoded text will appear here.

Free · Private · Runs in your browser

Why use it

  • Named and numeric entities

    Reserved characters, accents and symbols become entities that render literally in any page.

  • Decode too

    Turn &, ! and friends back into readable text in one click.

  • Private by default

    Everything runs in your browser; your text is never uploaded.

Great for

  • Showing code samples inside blog posts or docs
  • Putting quotes and ampersands safely into HTML attributes
  • Cleaning up entity-encoded text copied from a CMS

How to use

Encode

  1. Type or paste your text, e.g. Hello & welcome!
  2. Click Encode.
  3. Copy the entity-safe result.

Decode

  1. Paste text containing entities like & or !.
  2. Click Decode to get the readable text back.

Good to know

Auto encode re-encodes as you type, so you can watch the entities build up.

Questions

How do I encode HTML?
Paste your text and click Encode. Reserved characters (<, >, &, quotes) and non-ASCII letters and symbols become their named or numeric HTML entities, safe to paste into markup or an attribute.
How do I encode HTML in JavaScript?
You can replace the reserved characters manually (& → &amp;, < → &lt;, > → &gt;), or paste the string here and copy the encoded result. For rendering untrusted text, setting element.textContent is safer than building an HTML string.
Which characters get encoded?
Reserved and non-ASCII characters — <, >, &, quotes, accented letters and symbols — are turned into their named or numeric HTML entities.
Will it break my markup?
Encoding is safe to paste straight into an HTML attribute or text node. Decoding reverses it exactly.
Is there a length limit?
No. Paste as much text as you need.

29 more free tools, no sign-up

Encoders, generators, media and marketing tools — all right in your browser.

Browse all tools