We give a numerical simulation of the generation of the magnetic field and the charge-separation signal due to the chiral magnetic effect (CME) — the induction of an electric current by the magnetic field in a parity-odd matter — in the collisions of isobaric nuclei, 9644Ru + 9644Ru and 9640Zr + 9640Zr, at sNN=200 GeV. We show that such collisions provide an ideal tool to disentangle the CME signal from the possible elliptic-flow driven background effects. We also discuss some other effects that can be tested by using the isobaric collisions.