A robust JavaScript library for encoding and decoding HTML entities with full spec compliance.
he is a JavaScript library for encoding and decoding HTML entities. It converts special characters to their corresponding HTML entity references (like & or &) and vice versa, ensuring text is safely embedded in HTML documents. It solves the problem of inconsistent or incomplete entity handling in other libraries by strictly following the HTML specification.
Web developers and library authors who need reliable HTML entity processing in JavaScript applications, especially those building HTML parsers, validators, or text sanitization tools.
Developers choose he for its exact compliance with the HTML specification, robust handling of edge cases (including astral Unicode symbols), and extensive configurability. It's the most reliable option when browser-like entity processing is required.
A robust HTML entity encoder/decoder written in JavaScript.
Implements all standardized named character references and handles edge cases like ambiguous ampersands exactly as browsers do, ensuring reliable behavior per the HTML specification.
Correctly encodes and decodes astral symbols such as emojis and mathematical characters, a feature many other JavaScript libraries fail to provide.
Offers multiple encoding options including named references, decimal escapes, strict mode for validation, and context-aware decoding for different HTML contexts.
Extensively tested across various browsers and environments, ensuring high reliability and compatibility for diverse use cases.
Includes a binary for shell usage, enabling easy batch processing of HTML entities from the command line, which is useful for scripting and automation.
Only handles entity encoding/decoding; does not provide HTML sanitization, requiring additional libraries for full security against XSS attacks.
Full spec compliance and extensive feature set may introduce slower performance compared to minimalist escaping functions for basic tasks.
Numerous options like useNamedReferences and encodeEverything can be overwhelming for developers with simple needs, increasing learning curve.
A tiny (118 bytes), secure, URL-friendly, unique string ID generator for JavaScript
i18next: learn once - translate everywhere
Parse and stringify URL query strings
Javascript URL mutation library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.