ZumaTools

HTML Entity Encoder / Decoder

Type in either box — the other updates live, encoding or decoding as you go.

Editing this box encodes into the box below.
Editing this box decodes into the box above.
Options

Processed on your device — nothing is sent anywhere.

How it works

  1. Type or paste text into the Plain text box to encode it, or paste markup with entities into the Encoded HTML box to decode it.
  2. The other box updates live. Open Options to switch between decimal and hexadecimal numeric entities or to leave non-ASCII characters untouched.
  3. Click Copy under the box you need to put the result on your clipboard.

Frequently asked questions

Which characters get encoded?
The five HTML-critical characters — ampersand, less-than, greater-than, double quote and single quote — are always converted, since they can break markup or attributes. By default any character outside the ASCII range is also encoded, using a well-known named entity where one exists (such as © or —) and a numeric entity otherwise.
What is the difference between named and numeric entities?
A named entity like   uses a mnemonic defined by the HTML standard, while a numeric entity like   or   refers to the Unicode code point directly. Browsers treat them identically, but numeric entities work for every character, whereas only a fixed set of names exists. The decoder here understands both forms, including hexadecimal.
Is my text sent to a server?
No. Encoding and decoding run entirely in your browser with plain JavaScript — nothing is uploaded, logged or stored. The tool also keeps working offline once the page has loaded.
When do I actually need to encode HTML entities?
Whenever text that might contain angle brackets, quotes or ampersands ends up inside HTML: showing code examples on a page, inserting user-generated content, or putting a value with quotes into an attribute. Encoding turns the characters into harmless entities so the browser displays them instead of parsing them, which is also the basic defense against injected markup.
Why does my page show & instead of an ampersand?
That is double encoding: text that was already encoded got encoded a second time, so & became &. It typically happens when a template engine escapes output that a developer escaped manually first. Decode the text once in this tool to recover the intended version, then make sure only one layer of your stack does the escaping.

About this tool

This HTML entity encoder and decoder converts special characters to their entity representations and back again. It works in both directions at once: type plain text in one box to see it encoded, or paste markup full of entities in the other box to read it as normal text. Both views stay in sync as you type, and either side can be copied with one click.

The encoder always converts the five characters that can break HTML — the ampersand, both angle brackets, and both quote styles — and by default also encodes characters outside the ASCII range, preferring readable named entities like — where the standard defines one and falling back to numeric form otherwise. Options let you choose decimal or hexadecimal numeric entities, or leave non-ASCII text untouched for pages that are already served as UTF-8. Everything runs in plain JavaScript on your device; nothing you paste is transmitted or stored.

Developers reach for this when embedding code samples in blog posts or documentation, escaping strings before inserting them into templates, debugging feeds and emails where entities arrive double-encoded, and reading legacy HTML where every accented character was written as a numeric reference. The decoder accepts named, decimal, and hexadecimal entities in any mix, which makes it useful for untangling text that has passed through several systems.

Two practical notes. On a modern UTF-8 page you only strictly need to encode the five critical characters — accented letters and symbols can be written literally, which keeps source markup readable, so the leave-non-ASCII option is often the right choice. And if you ever see & or & rendered on a live page, that is double encoding: some layer escaped text that was already escaped, and the fix is removing one layer, not adding another decode in front of users.

Related tools