Text and dataRuns in your browser

HTML Entity Encoder and Decoder

Encode special characters for displaying text in HTML, or decode supported entity references. The resulting markup is not executed.

  • Named and numeric entities
  • 200,000-character limit
  • Local processing
Online tool

Try the tool

Add your data, choose the settings, and get the result.

Input

Decoding requires a terminating semicolon and never executes the resulting HTML markup.

Result

—

Processing in your browser

Text and selected files are processed in the current browser and are not sent to a server to produce the result.

Reviewed: 2026-07-17
01

How to use it

  1. 1

    Enter plain text or a string containing HTML entities.

  2. 2

    For encoding, choose whether to process quotation marks and non-ASCII characters.

  3. 3

    Run encode or decode and copy the result.

02

What the tool can do

  • Encoding for &, <, >, and optional quotation marks.
  • Decoding for common named entities and decimal or hexadecimal numeric references.
  • Unicode code point support, including characters outside the Basic Multilingual Plane.
03

Common use cases

  • Preparing a text fragment for display inside HTML.
  • Inspecting entity references in a template or CMS content.
  • Restoring readable text from a test HTML payload.
04

How it works inside

Output is rendered as plain React text and is never passed to dangerouslySetInnerHTML.

Non-ASCII characters can remain unchanged or be emitted as decimal or uppercase hexadecimal references.

05

Questions and answers

How can I display HTML tags as plain text?

Encode special characters such as < and > with this tool, then copy the result where you need to display an HTML example. Decoding reverses the conversion, but the resulting tags are not executed here.

Why do some HTML entities remain unchanged?

The tool decodes supported entities ending in a semicolon. Check the spelling and ending, such as &amp;. Unknown or incomplete entities may not be converted.