A bioinspired catalyst uses embedded magnetic fields to switch between hydrogen peroxide and water production pathways.