HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 7 community runs

Desktop Results:
Chrome 7 runs
js-xss
576/s
dompurify
120/s

Fastest: js-xss (4.8x faster)

View exact numbers
  • js-xss: 576 ops/sec
  • dompurify: 120 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    dompurify
    js-xss

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0
Chrome 131 on Mac OS X 10.15.7
View result in a separate tab
js-xss
850/s
dompurify
142/s
View exact numbers
Test name Executions per second
js-xss 850 Ops/sec
dompurify 142 Ops/sec