DEVELOPER / THE EVERYDAY TOOLKIT

HTML Entity Encoder.

Encode HTML special characters or decode character references. This is a free utility from my portfolio toolkit, with local browser processing and no account required.

Free to use Local processing No account required

Encoding covers &, <, >, quotes and apostrophes. Decoding supports numeric references and amp, lt, gt, quot, apos and nbsp. It does not sanitize HTML.

SIMPLE BY DESIGN

How to use HTML Entity Encoder

  1. Paste literal markup characters to encode, or supported character references to decode.
  2. Choose the direction and review the plain-text result.
  3. Copy the result into the correct HTML context; do not assume it is safe for every attribute or script context.

Display markup characters as text.

Documentation and code examples need characters such as < and & to appear literally instead of becoming markup. Encoding replaces the five HTML-sensitive characters with character references. Decoding handles numeric references and a documented set of common named references. The output is plain text and is never executed. Encoding a string is not a substitute for context-aware escaping, safe DOM APIs or an HTML sanitizer when accepting untrusted content.

Encoding covers &, <, >, quotes and apostrophes. Decoding supports numeric references and amp, lt, gt, quot, apos and nbsp. It does not sanitize HTML.

A FEW THINGS TO KNOW

A little more clarity.

Does decoding remove dangerous HTML?

No. This utility encodes or decodes text; it does not sanitize HTML. Decoded markup must still be treated as untrusted input.

Is my input sent to a server?

No. This utility processes your input in your browser. URLs you paste are treated as data; the tool does not fetch them. Be careful with clipboard history on shared devices.

KEEP YOUR WORKFLOW MOVING

Useful next steps.

FROM THE JOURNAL

Progressive Enhancement: Keep Content Useful Before JavaScript Runs

Build readable pages first, then layer on filtering, animation and richer interactions without making the content depend on them.

Read the guide