
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
html-entity-codec
Advanced tools
Decode, encode, and escape HTML character references
No dependencies whatsoever. This package declares no dependencies or devDependencies.
HTML character-reference transformations from pinned WHATWG data.
This package is pure ESM.
npm i html-entity-codec
import assert from "node:assert/strict";
import { decode } from "html-entity-codec";
assert.equal(
decode("Cat & fiddle 😼🎻"),
"Cat & fiddle 😼🎻",
);
Please visit codsen.com for a full description of the API. For Changelog, see raw md on GitHub or the website.
To report bugs or request features or assistance, raise an issue on GitHub.
MIT License
Copyright © 2010-2026 Roy Revelt and other contributors
HTML named character references - Copyright © WHATWG (Apple, Google, Mozilla, Microsoft) - see its BSD-3-Clause disclaimer

FAQs
Decode, encode, and escape HTML character references
The npm package html-entity-codec receives a total of 13,240 weekly downloads. As such, html-entity-codec popularity was classified as popular.
We found that html-entity-codec demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.