---
id: "string-wellformed"
kind: "web-feature"
canonical: "https://timetostable.com/feature/string-wellformed"
baseline: "high"
bcd_version: "8.1.11"
web_features_version: "3.48.0"
---

# String isWellFormed() and toWellFormed() (`string-wellformed`)

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.

- **Group**: Strings
- **Baseline**: Widely Available
- **Newly Available Date**: 2023-10-24
- **Widely Available Date**: 2026-04-24
- **Specification**: https://tc39.es/ecma262/multipage/text-processing.html#sec-string-objects
- **Constituent BCD keys**: 2

## Browser Support Timeline

| Browser | Version | Release Date |
| --- | --- | --- |
| Chrome | 111 | 2023-03-07 |
| Chrome Android | 111 | 2023-03-07 |
| Edge | 111 | 2023-03-13 |
| Safari | 16.4 | 2023-03-27 |
| Safari on iOS | 16.4 | 2023-03-27 |
| Firefox | 119 | 2023-10-24 |
| Firefox for Android | 119 | 2023-10-24 |

