Voxel-based soft robots (VSRs) are robots composed of many small, cubic blocks of a soft material with mechanical properties similar to those of living tissues and that can change their volume based on signals emitted by the robot controller, i.e., by its brain. Designing the body and the brain of a VSR suitable for a specific task is a complex activity that requires suitable optimization heuristics. We here present a software, 2D-VSR-Sim, for facilitating research on the optimization of VSRs body and brain. 2D-VSR-Sim, written in Java, provides consistent interfaces for all the VSRs aspects suitable for optimization and considers by design the presence of sensing, i.e., the possibility of exploiting the feedback from the environment for controlling the VSR. We present the mechanical model employed by 2D-VSR-Sim and we experimentally characterize the computational burden of the simulation. Finally, we show how 2D-VSR-Sim can be used to repeat the experiments of significant previous studies and, in perspective, to provide experimental answers to a variety of research questions.