SITE UNDER CONSTRUCTION. Everything here is provided AS IS, WITHOUT WARRANTIES, to the extent the law allows. It is information, not professional advice. Use at your own risk. Terms and liability limits →

eThorns ES
← DeveloperES

Tool 5.8

HTML entity encoder & decoder (Latin-1, named)

Encode text as HTML entities (named, decimal or hex) or decode entities back to text: <, >, &, quotes, Spanish accents, Latin-1 symbols. Runs in your browser.

Runs on your deviceRuns entirely in your browser: nothing you type or upload leaves your device.

How to use it

  1. Choose Encode (text to entities) or Decode (entities to text).
  2. For Encode, pick the format (named, decimal or hex) and the scope: the five special characters only, those plus every non-ASCII character (the default), or every character.
  3. Type or paste the text; the result updates as you type.
  4. Copy or download the result, or press Swap / Reverse to move it to the input and switch the mode.

When a < or an & breaks the page

HTML uses <, >, & and quotes to mark tags and attributes. If text that should be shown as text contains them, the browser reads it as code: a product name like Café & Té <nuevo> can lose a word, break the layout or, when the text comes from a visitor, let someone inject their own HTML or script (the attack called XSS). An HTML entity writes the character in a way the browser displays but never treats as code: &lt; for <, &amp; for &.

Entities also help in email templates and older systems that mangle accented letters, since &ntilde; is plain ASCII and survives any encoding. The tool encodes and decodes in your browser; the text isn't sent anywhere.

Example: a price line for tienda-ejemplo.co

You want to show <p>Café & Té: $1.200 (año 2026)</p> as visible text on a page of tienda-ejemplo.co. With the default options (named format, special and non-ASCII characters), Encode gives &lt;p&gt;Caf&eacute; &amp; T&eacute;: $1.200 (a&ntilde;o 2026)&lt;/p&gt;. The brackets become &lt; and &gt;, the ampersand &amp;, and é and ñ their named entities.

With the Decimal format the ñ becomes &#241; instead, and with Hexadecimal &#xF1;; browsers show all three the same. Characters that have no name in the tool, such as an emoji, are written as numbers even in the named format. Press Swap / Reverse and Decode gives back the original line.

Double encoding and other traps

Encoding the same text twice is the most common bug. Encode always escapes &, so &amp; becomes &amp;amp;, and the page then shows &amp; as text. If a site shows &amp; or &eacute; on screen, something encoded it twice.

On a page saved as UTF-8 (with <meta charset="utf-8">), accents and ñ don't need entities; Special only is enough there. And escaping for HTML only protects HTML text and attributes: text placed inside a <script> block, a URL or a CSS value needs the escaping of that language.

FAQ

What are the five special characters in HTML and XML?

`&` (`&amp;`), `<` (`&lt;`), `>` (`&gt;`), the double quote (`&quot;`) and the apostrophe (`&apos;`). In text, `&` and `<` are the ones that must be escaped; the quotes matter inside attribute values. `&apos;` didn't exist in HTML 4, so some old email clients show it as text; use the Decimal format (`&#39;`) for those.

What is the difference between named, decimal, and hex entities?

Named entities use mnemonic words (like `&copy;` for the copyright symbol). Decimal entities use the character's Unicode decimal code (`&#169;`), while hexadecimal entities use its hex code (`&#xA9;`). All three render identically in web browsers.

Does it cover Spanish accents and ñ?

Yes. It has named entities for the whole Latin-1 range, which includes á, é, í, ó, ú, ü and ñ in lower and upper case (`&aacute;`, `&Ntilde;`) and the opening marks `&iquest;` and `&iexcl;`, plus a few typographic signs such as `&euro;`, `&ndash;`, `&hellip;` and `&trade;`.

Can it decode emojis and other Unicode characters?

Yes, when they are written as numbers: `&#128512;` and `&#x1F600;` both decode to the grinning-face emoji, and any code point up to the end of Unicode works. When encoding, characters outside the named list come out as decimal or hex numbers.

Why is an entity like &hearts; left unchanged?

The decoder knows about 100 names: the five special characters, the Latin-1 set and a few typographic signs. HTML defines more than 2,000, and names outside the tool's list are left as they are instead of guessed. A reference without its final `;` is also left alone. Numeric references (`&#9829;`) always decode.

  • 5.1JSON formatterFormat or minify JSON and find syntax errors by line and column.
  • 5.2CSV to JSON converterConvert CSV to JSON or JSON to CSV with comma, semicolon or tab separators.
  • 5.3YAML to JSON converterConvert YAML to JSON and back in your browser.
  • 5.4Base64Encode or decode Base64 in your browser: UTF-8 text, URL-safe Base64, files to Base64 or data URLs, and Base64 back to a downloadable file.
  • 5.5Color contrast checkerCheck the contrast ratio of a text color on its background against WCAG 2.2 AA and AAA, for normal text, large text and UI components.
  • 5.6Cron explainerRead a 5-field cron expression as a plain sentence and see its next 5 run times in your time zone.
  • 5.7Number base converterConvert whole numbers between decimal, hexadecimal, binary and octal, with bit length and grouped digits.
  • 5.9URL encodePercent-encode or decode URLs and query values, and break any URL into protocol, host, path, query parameters and fragment.
  • 5.10SHA-256 hashGet SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or files and verify a download against its published checksum.
  • 5.11UUID generatorGenerate random UUID v4 or time-ordered UUID v7 (RFC 9562) in your browser, 1 to 1000 at a time, in uppercase or without dashes.
  • 5.12Unix timestampConvert Unix timestamps in seconds or milliseconds to ISO 8601, UTC and your local time, or a date back to epoch.
  • 5.13JWT decoderDecode a JSON Web Token in your browser: see the header and payload as formatted JSON and whether it has expired.
  • 5.14Regex testerTest regular expressions live: highlighted matches, capture and named groups, flags and clear errors.

╌╌ END ╌╌