godz.online
Back to tools

Developer tools

HTML entity encoder & decoder

Escape special characters into HTML entities, or decode entities back to text. Everything runs in your browser - nothing is uploaded.

Mode
Output

How it works

Encode text into HTML entities or decode entities back into plain text, in your browser. Some characters have special meaning in HTML - the angle brackets that open tags, the ampersand that starts an entity, and the quotes around attribute values - so when you want to display them literally they have to be written as entities like < > & and ". Encoding does that escaping for you; decoding reverses it.

Encode mode always escapes the five characters that matter for safety - & < > " and the apostrophe - and offers an option to also numerically encode every non-ASCII character, which is useful when a document or email must be pure ASCII. Decode mode understands the common named entities as well as numeric ones in both decimal (&#169;) and hexadecimal (&#xA9;) form. Everything runs in your browser, so nothing you paste is uploaded.

Example. Encoding <a href="x">Tom & Jerry</a> produces &lt;a href=&quot;x&quot;&gt;Tom &amp; Jerry&lt;/a&gt;, which a browser will display as the literal text instead of rendering a link. Decoding &copy; 2024 &#8212; all rights reserved turns the entities back into the copyright sign and a dash.

FAQ

Which characters get encoded?

Encoding always escapes the five HTML-significant characters: ampersand, less-than, greater-than, double quote, and apostrophe. There is an option to also encode every non-ASCII character as a numeric entity, which you can turn on when the output needs to be plain ASCII, for example in some email or legacy systems.

What is the difference between named and numeric entities?

A named entity uses a human-readable label, like &amp; for ampersand or &copy; for the copyright sign. A numeric entity uses the character code instead, in decimal (&#38;) or hexadecimal (&#x26;). Both represent the same character; decoding here understands the common named entities and all numeric ones.

Why would I encode HTML entities?

To display characters literally rather than have the browser interpret them, and to avoid breaking markup. Showing example code, putting special characters in attribute values, or safely including user text are all cases where escaping & < > and quotes prevents the content from being parsed as tags.

Is anything uploaded?

No. Encoding and decoding run entirely in your browser. Nothing you paste is sent to a server, logged, or stored.