DOMPurify vs Sanitize HTML vs js-xssFastest: js-xss (15.5x faster)
341,008 ops/sec
98,921 ops/sec
21,982 ops/sec
Fastest: js-xss (18.9x faster)
175,479 ops/sec
50,719 ops/sec
9,290 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| DOMPurify | |
| Sanitize HTML | |
| js-xss |
| Test name | Executions per second |
|---|---|
| ✓ js-xss | 505,442 Ops/sec |
| Sanitize HTML | 168,615 Ops/sec |
| DOMPurify | 41,060 Ops/sec |