SARS-CoV-2, the virus that causes COVID-19, spreads i. a., by respiratory droplets. The use of masks in preventing spread is controversial; masks are considered useless by many, while being mandated in some locations. Here, the effect of masking the general population on a COVID-19-like epidemic is estimated by computer simulation using three separate types of software. The main questions are whether mask use by the general population can limit the spread of SARS-CoV-2 in a country and how to identify opportunities when mask use is cost-effective and safe. To address these questions, the protective effects of different types of masks, the side-effects of masks, and avenues for improvements of masks and masking are addressed. Main results: (i) Any type of mask, even simple home-made ones, may be of value, even if the protective effect of each mask (here dubbed “one mask-protection”) is low. Strict adherence to mask use does not appear to be critical but increasing one mask-protection to >50% was found to be advantageous. (ii) Masks do seem to reduce the number of new cases even if introduced at a late stage in an epidemic, but early implementation helps reduce the cumulative and total number of cases. (iii) The simulations suggest that it might be possible to eliminate a COVID-19 outbreak by widespread mask use during a limited period. There is a brief discussion of why the reported effect size of masking varies widely, and is expected to do so, because of different filtration abilities of different masks, differences in compliance and fitting, other routes of transmission, pre-existing immunity, and because a system of interconnected, disease-prone individuals has non-linear properties. A software solution to visualize infection spread is presented. The results from these simulations are encouraging, but do not necessarily represent the real-life situation, so it is suggested that clinical trials of masks are now carried out while continuously monitoring effects and side-effects. As mask use is not without risks and costs, it is suggested that governments and scientists have an important role in advising the public about the sensible use of masks.