html-generators

JSON →
library 1.1.0 ·javascript maintenance
verified Jun 4, 2026

A library for generating random HTML strings for property-based testing. Version 1.1.0 is stable with no recent releases (last updated 2017). It builds on chance-generators and integrates with unexpected-check and unchecked. Unlike other HTML generators, it produces structurally valid but semantically random HTML documents, including elements, attributes, and content. Supports custom seeds and limits. Suitable for testing HTML parsers, minifiers, sanitizers, and other tools where diverse HTML input is needed.