UTF-8 Encoder/Decoder for JavaScript
JSON →The `utf8.js` package, currently at its stable version 3.0.0 (last updated in late 2017), provides a comprehensively tested and robust JavaScript implementation for encoding and decoding UTF-8 strings. It distinguishes itself by strictly adhering to the Encoding Standard, ensuring precise handling of all scalar Unicode code point values. A core aspect of its design is strict error handling: the library explicitly throws an `Error` when attempting to encode non-scalar values (such as lone surrogates) or when encountering malformed UTF-8 data during decoding. This approach prioritizes data integrity over silent error correction. For developers requiring the ability to encode or decode non-scalar values, the related `WTF-8` library is recommended. Given its foundational utility and mature status, the project is considered to be in maintenance mode, receiving updates primarily for critical issues rather than frequent feature additions.
Traffic · last 30 days ↓86% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France