Many (metaheuristic) techniques for water distribution network (WDN) design optimisation already have been developed. Despite of the aforementioned scientific attention, only few, high-quality benchmark networks are available for algorithm testing, which, in turn, hinders profound algorithm testing, sensitivity analysis and comparison of the developed techniques. This absence of high-quality benchmark networks motivated us to develop a tool to algorithmically generate close-to-reality virtual WDNs. The tool, called HydroGen, can generate WDNs of arbitrary size and varying characteristics in EPANET or GraphML format. The generated WDNs are compared to (and shown to closely resemble) real WDNs in an analysis based on graph-theoretical indices. HydroGen is used to generate an extensive library of realistic test networks on which (metaheuristic) methods for the optimisation of WDN design can be tested, allowing researchers in this area to run sensitivity analyses and to draw conclusions on the robustness and performance of their methods.