Miniaturized neuromodulation systems could improve the safety and reduce the invasiveness of bioelectronic neuromodulation. However, as implantable bioelectronic devices are made smaller, it becomes difficult to store enough power for long-term operation in batteries. Here, we present a battery-free epidural cortical stimulator that is only 9 millimeters in width yet can safely receive enough wireless power using magnetoelectric antennas to deliver 14.5-volt stimulation bursts, which enables it to stimulate cortical activity on-demand through the dura. The device has digitally programmable stimulation output and centimeter-scale alignment tolerances when powered by an external transmitter. We demonstrate that this device has enough power and reliability for real-world operation by showing acute motor cortex activation in human patients and reliable chronic motor cortex activation for 30 days in a porcine model. This platform opens the possibility of simple surgical procedures for precise neuromodulation.