HTML Encoder/Decoder

Show code and special characters safely on a web page, or turn text full of < and ' back into something readable. The encoder escapes the characters that HTML treats as markup; the decoder understands every named, decimal and hexadecimal entity.

This tool runs entirely in your browser. Your files and text are processed on your own device and are never uploaded to our servers.

How to use the HTML Encoder/Decoder

  1. Choose Encode to escape text for HTML, or Decode to turn entities back into characters.
  2. Type or paste your text; the result appears instantly.
  3. Optionally encode every non-ASCII character as a numeric entity, for systems that can’t handle UTF-8.
  4. Copy or download the result, or use Swap to reverse it.

Examples

Showing HTML code on a page

Input
<a href="/home">Home</a>
Result
&lt;a href=&quot;/home&quot;&gt;Home&lt;/a&gt;

Decoding entities

Input
Fish &amp; chips &mdash; &euro;5
Result
Fish & chips — €5

Why escaping matters

Browsers treat < and & as the start of tags and entities. Inserting user-provided text into HTML without escaping can break the layout — or allow cross-site scripting (XSS), where injected markup runs in other people’s browsers. Escaping &, <, >, " and ' turns them into harmless text. In application code, prefer your framework’s built-in escaping, which does this automatically.

Frequently asked questions

Is my text uploaded?

No. Encoding and decoding happen in your browser. Decoding uses an inert document that never runs scripts or loads anything.

Which characters are encoded?

By default the five HTML-special characters: & < > " and '. With the option ticked, every character outside basic ASCII is also written as a numeric entity such as &#xE9;.

Does decoding run any HTML I paste?

No. Tags in the input are kept as plain text in the result; only entities are converted.

What is the difference between &#233;, &#xE9; and &eacute;?

They are the same character (é) written as a decimal reference, a hexadecimal reference and a named entity. The decoder accepts all three.

Everything you need. One simple place.

Free, fast online tools for text, PDFs, images, data and everyday maths. Every tool runs entirely in your browser, so your files stay on your device.

  • Privacy-first processing
  • No sign-up required

© 2026 Toolora. All rights reserved.

Built for speed and privacy