Context. Comparing theoretical predictions to real data is crucial to properly formulate galaxy formation theories. However, this is usually done naively considering the direct output of simulations and quantities inferred from observations, which can lead to severe inconsistencies. Aims. We present FORECAST, a new flexible and adaptable software package that performs forward modeling of the output of any cosmological hydrodynamical simulations to create a wide range of realistic synthetic astronomical images, and thus providing a robust foundation for accurate comparison with observational data. With customizable options for filters, field-of-view size, and survey parameters, it allows users to tailor the synthetic images to their specific requirements. Methods. FORECAST constructs a light cone centered on the observer’s position exploiting the output snapshots of a simulation and computes the observed flux of each simulated stellar element, modeled as a single stellar population, in any chosen set of passband filters, including k correction, intergalactic medium absorption, and dust attenuation. These fluxes are then used to create an image on a grid of pixels, to which observational features such as background noise and PSF blurring can be added. This allows simulated galaxies to be obtained with realistic morphologies and star formation histories. Results. As a first application, we present a set of images obtained exploiting the ILLUSTRISTNG simulation, emulating the GOODS-South field as observed for the CANDELS survey. We produced images of ~200 sq. arcmin, in 13 bands (eight Hubble Space Telescope optical and near-infrared bands from ACS B435 to WFC3 H160, the VLT HAWK-I Ks band, and the four IRAC filters from Spitzer), with depths consistent with the real data. We analyzed the images with the same processing pipeline adopted for real data in CANDELS and ASTRODEEP publications, and we compared the results against both the input data used to create the images and the real data, generally finding good agreement with both, with some interesting exceptions which we discuss. As part of this work, we have released the FORECAST code and two datasets. The first is the CANDELS dataset analyzed in this study, and the second dataset emulates the JWST CEERS survey images in ten filters (eight NIRCam and two MIRI) in a field of view of 200 sq. arcmin between z = 0–20. Conclusions. FORECAST is a flexible tool: it creates images that can then be processed and analyzed using standard photometric algorithms, allowing for a consistent comparison among observations and models, and for a direct estimation of the biases introduced by such techniques.