In this paper we show, for the first time, that charged-hadron masses can be calculated on the lattice without relying on gauge fixing at any stage of the calculations. In our simulations we follow a recent proposal and formulate full QCD+QED on a finite volume, without spoiling locality, by imposing C-periodic boundary conditions in the spatial directions. Electrically charged states are interpolated with a class of operators, originally suggested by Dirac and built as functionals of the photon field, that are invariant under local gauge transformations. We show that the quality of the numerical signal of charged-hadron masses is the same as in the neutral sector and that charged-neutral mass splittings can be calculated with satisfactory accuracy in this setup. We also discuss how to describe states of charged hadrons with real photons in a fully gauge-invariant way by providing a first evidence that the proposed strategy can be numerically viable.