🏠 New in High Baseline Support: String isWellFormed() and toWellFormed()

April 24, 2026

caniuse · mdn · spec

The isWellFormed() method of strings returns a boolean indicating if the string contains any Unicode lone surrogates. The toWellFormed() method returns a new string where all lone surrogates are replaced by the Unicode replacement character.

Source features