Blindness affects 40 million people across the world. A neuroprosthesis could one day restore functional vision in the blind. We implanted a 1024-channel prosthesis in areas V1 and V4 of the visual cortex of monkeys and used electrical stimulation to elicit percepts of dots of light (called phosphenes) on hundreds of electrodes, the locations of which matched the receptive fields of the stimulated neurons. Activity in area V4 predicted phosphene percepts that were elicited in V1. We simultaneously stimulated multiple electrodes to impose visible patterns composed of a number of phosphenes. The monkeys immediately recognized them as simple shapes, motions, or letters. These results demonstrate the potential of electrical stimulation to restore functional, life-enhancing vision in the blind.