Your temples throb as you enter the pharmacy. For months you have been battling daily migraine headaches. You have tried your doctor's every suggestion—drinking more water, changing your diet, getting extra sleep—and downing a host of pain pills. Now you are armed with a prescription for a totally different kind of treatment.

The pharmacist guides you to a shelf of headgear, labeled with different brain regions. She fits you for a cap, the underside of which features thin conductive metal strips, called electrodes, coated in adhesive gel to stick gently to your scalp. The electrodes link to a slim cable that dangles from the back of the cap. She then hands over the key component of your prescribed medication: an electric stimulator.

Once a day for the next week you will don the headgear and plug the cable into this device for a 20-minute dose of electricity. Setting aside your trepidation, you give it a try in front of the pharmacist. At first you feel only a tingling sensation and then relief.

As you wear the cap, an electric current is traveling from the electrodes, past hair, scalp and bone, into the brain regions responsible for your migraines. At first it merely blunts the pain, but over time it will also gradually rewire your neurons to prevent future attacks. The pharmacist explains that you will be free to carry on with your day—finish chores, watch television, go for a walk—with the cap on your head, and when the dose is up, the stimulator will simply stop running.

For now this scene is still the stuff of science fiction, but many researchers believe that within the next few years this form of treatment could become commonplace. The technique, called transcranial direct-current stimulation (tDCS), is being investigated for dozens of applications, including helping people recover from brain injury, treating depression, enhancing vigilance and managing pain.

Using electricity to tinker with the brain is nothing new. We have long known that neurons send electrical signals to communicate. In response, scientists have sought to hack these missives to alter or heal the brain. Yet most efforts have been cumbersome, dangerous or costly. In contrast, tDCS is noninvasive, inexpensive, user-friendly and portable. The only known side effects are minor skin redness and irritation, which can be corrected by adjusting the headgear.

In fact, some scientists suspect that tDCS could launch a new era in treatment that could rival traditional drugs. Researchers have spent decades struggling to develop pharmaceutical medicines that can enter the brain and heal it, with only mixed success. Now a growing community of brain scientists hope that electricity might succeed where chemicals have largely failed. At least one company—GlaxoSmithKline—is already funding research into electrical therapies. Clinics and hospitals around the world have begun to offer the technique to patients in need of rehabilitation. The Department of Defense has invested tens of millions of dollars into investigating techniques that can boost cognition in healthy individuals. The media buzz surrounding these developments has inspired a community of hobbyists who are eschewing caution and attempting tDCS at home.

To develop tDCS into a credible therapy and enhancer, scientists will need to answer many lingering questions. They must determine the proper doses of electric current that work best with different ailments. And they must dramatically scale up experiments to clarify the safety and efficacy of these treatments across large populations. Those caveats aside, the growing interest in tDCS suggests patients and physicians are eager for new methods to treat the brain. In a few years' time, small doses of electric current may be just what the doctor orders.

The Brain Electric

The basic components of this technology are straightforward: a power source and a way to transfer electricity into the brain. So simple is the technique that even humans of antiquity explored rudimentary forms of it. In the first century a.d., for example, Roman emperor Claudius's physician applied torpedo fish (electric rays) to the skull to treat headaches. Eighteenth-century electrical discoveries led to more sophisticated experimentation. By 1802 Italian physicist Giovanni Aldini had proposed a treatment for depression that involved tapping a patient's head with direct current from a battery.

The 20th century brought more complex techniques for electrical healing onto the scene. In the 1930s doctors began treating mental illness by inducing seizures with electric shocks. Fifty years later scientists demonstrated that brain regions could be electrically activated either from the outside using large magnets, a technique called transcranial magnetic stimulation (TMS), or with the aid of surgically implanted electrodes. These methods, which involve expensive equipment and in some cases serious side effects, were generally considered procedures of last resort. Drug discoveries, not electrical interventions, were believed to hold the most promise for treating conditions of the brain.

A few researchers nonetheless kept tinkering with a simple form of electrical brain stimulation throughout the 20th century that would ultimately evolve into modern tDCS. The challenge for these pioneers was to find a way to demonstrate and measure the physiological changes this technique could induce.

In 2000 neurophysiologists Michael Nitsche and Walter Paulus of the George August University of Göttingen in Germany developed an ingenious means of doing this. Rather than administering tDCS by itself, they used it to alter the brain's response to TMS, a more established technology. The researchers first placed their participants' motor cortex under a large magnetic coil. This device induced electrical activity in the area that controls movement in a person's right pinky finger. Producing such activity caused the pinky to wiggle.

Nitsche and Paulus also placed two electrodes over portions of the motor cortex and linked them to a battery. Turning it on sent a low amount of current in one electrode, through the skull, into the brain and out through the other electrode. Depending on how they configured the setup, Nitsche and Paulus could change the direction the current traveled through the brain, which they discovered would either intensify or diminish the pinky twitching initiated by TMS. In essence, they could use tDCS to fine-tune the effects of the magnetic coil.

At the time researchers already had a strong understanding of the way TMS altered the brain. As a result, this experiment was able to demonstrate convincingly that tDCS had a real effect on neural activity. Somehow the weak current influenced the behavior of neurons above and beyond the changes expected from TMS.

Nitsche and Paulus suspected that tDCS was altering the way in which brain cells could respond to electric signals. Neurons send and receive information by releasing a spike of electricity through connections called synapses. The signals themselves are created by the movement of charged ions in and out of brain cells. In TMS, the powerful magnet can cause neurons to expel and admit ions, forcing them to fire.

But the current created by tDCS has a subtler effect. It produces a river of charged ions that wends its way through the head and brain in a circuit. As this current flows around and through neurons, it can alternately blunt or enhance their responses to other electric messages. Neurons near the electrode that introduces current into the brain become more sensitive to electric signals. But those near the electrode that removes current are less responsive. Subsequent experiments revealed that this approach could manipulate not only the electric signals from a magnetic coil but also those produced naturally in the brain.

In the 14 years since Paulus and Nitsche's seminal experiment, numerous scientists have confirmed not only that tDCS can change the brain's activity but also that it offers therapeutic benefits. Whereas other electrical approaches effectively kick certain neurons into action, tDCS serves as a volume dial. The flow of electric current in this technique can either make neurons more voluble or quiet them down.

Jump-Starting Health

The ability to dial up or down neuronal chatter offered neuroscientists an abundance of options for treating disorders. The technique could be used to increase signaling that helps to heal the brain or dampen activity that contributes to dysfunction, or both.

The first challenge in using tDCS as a therapy is identifying the best neurons to target for a given problem. Typically multiple brain regions contribute to a disease, which means many different stimulation setups could bring a patient relief. Consider the case of migraine pain. Brain scans of people afflicted with these severe headaches have revealed that before an attack, part of their visual cortex becomes more active. So Paulus and his colleagues decided to see if quieting that area with tDCS could prevent headaches.

In the study, which was published in 2011, 12 migraine sufferers received six weeks of electric stimulation. For 15 minutes a day, three days a week, the scientists directed current to discourage signaling in the migraineurs' visual cortex. The remaining individuals received a sham treatment, in which they merely experienced a tingling sensation. Eight weeks later the researchers followed up with their participants. Subjects who had received the full course of tDCS had shorter migraines, with significantly less pain, than those in the sham condition did. The treatment was not a cure-all—it did not make migraines less frequent—but it seemed to at least soften their blow.

Other experiments, however, have hinted at a different way to assuage migraine pain. Namely, stimulating parts of the motor cortex is known to trigger the release of natural painkillers called opioids. A year after Paulus's migraine study, a second group of scientists, led by University of Michigan pain neuroscientist Alexandre DaSilva and including one of us (Bikson), opted to rev up the motor cortex with electric current. During the course of four weeks, seven migraine patients received 10 sessions of tDCS, 20 minutes each, and five others received sham stimulation. The recipients of tDCS did not experience immediate relief, but in the weeks that followed, they reported less pain than individuals in the sham group, and their relief persisted for months. Ultimately these different approaches may allow clinicians to craft customized treatments for patients.

As both experiments demonstrated, the full effects of tDCS can materialize slowly and endure for weeks or months. This is in part because tweaking the rate at which neurons fire can alter the architecture of the brain in lasting ways. When brain cells activate together, the connections among them grow stronger and more numerous. Cells that seldom fire in concert gradually lose their linkages. Adding tDCS can therefore heighten the brain's ability to rewire itself—its plasticity.

A boost in plasticity can have powerful implications for repairing the brain after damage. During a stroke, for example, the blood supply to a part of the brain becomes blocked, starving neurons and damaging their connections. Through months of rehabilitation, people can relearn lost skills as their plastic brain builds new connections among surviving neurons. Incorporating tDCS could potentially speed up their recovery.

In 2011 Harvard Medical School neuroscientist Felipe Fregni and his collaborators investigated this idea while working with 14 patients who spent two weeks engaging in regular exercises to regain motor control. In addition, the subjects received either 40 minutes of daily tDCS or a sham treatment. Fregni and his colleagues aimed current at injured brain areas in the motor cortex to encourage the growth of new connections. All the patients gained some motor function after two weeks of therapy. Yet the group receiving tDCS recuperated the most. In a sense, tDCS seems to help the brain to help itself.

Rehabilitation and pain management are just two promising avenues of tDCS research. As we learn more about the networks in the brain associated with neurological and psychiatric disorders, many scientists believe the technique could quell symptoms from a host of conditions, including dementia, epilepsy and schizophrenia.

The small, proof-of-concept studies that have occupied scientists for the past decade are now giving way to large-scale, long-term trials. In 2013, for example, University of São Paulo physiologist Andre Brunoni led a six-week, 120-patient trial in which tDCS had comparable benefits to a commonly prescribed antidepressant in treating depression. Brunoni is now expanding his efforts with a pool of 240 patients and other medications. Studies of this kind will be the best way to illuminate the technique's full potential going forward.

Zap to Attention

Aside from tDCS's promise as a therapy, many people have become fascinated by how stimulation could change the lives of healthy individuals. If we can suss out the core networks linked with such abilities as critical thinking and creativity, the logic goes, scientists could give those areas a boost. Or they could dial down unwanted negative emotions and bad habits.

Indeed, growing evidence supports the idea that tDCS could enhance the brain's abilities in domains as diverse as curbing junk food cravings and modifying mood. Several research groups have proposed that tDCS can accelerate an individual's ability to master new words and grammatical rules, as well as complex motor tasks such as memorizing an intricate finger-pinching pattern.

These studies are still relatively small in size and their effects are modest. Any attempts to elevate performance using tDCS would almost certainly need to occur in tandem with—not instead of—old-fashioned approaches to learning. Just as Fregni's rehabilitation study coupled stimulation with traditional physical therapy, users seeking cognitive enhancement would still need to avail themselves of lots of practice, exercise and rest.

Yet tDCS might exceed conventional approaches in a few choice areas. In 2014 biomedical engineer Andy McKinley of the U.S. Air Force Research Laboratories published his findings on the use of tDCS in improving vigilance. McKinley's team worked with 30 military recruits who had to endure 30 hours of wakefulness while taking a series of attention tests. Four hours in, the researchers gave 10 recruits a 40-minute session of tDCS and some plain chewing gum. In this case, the team aimed electric current to stimulate activity in the dorsolateral prefrontal cortex, an area supporting many functions, among them attention and working memory.

The remaining recruits had a session of sham stimulation at the four-hour mark, and 10 of these subjects also obtained a stick of caffeinated gum. In this way, McKinley could pit tDCS head-to-head with caffeine, one of humanity's favorite vigilance enhancers. At the end of the trial, the researchers discovered that the group receiving tDCS showed pronounced improvements in their test scores, and this boost in alertness lasted for six hours. Caffeine's kick, in contrast, was less potent and persisted for only two hours. Nothing beats a good night's rest—but perhaps swapping java for a jolt of electricity could someday help the sleep-deprived.

Ready for Prime Time?

Scientists working with tDCS are now at a crossroads. On one hand, researchers are still unraveling the basic mechanisms of tDCS, and on the other, patients, government agencies and companies are angling to bring this technique to the real world.

One of the major remaining questions to address is dosage. Thus far studies have used very weak levels of stimulation to produce modest findings. Scientists now need to figure out where the electrodes should ideally be placed for a given condition, as well as the optimal intensity of stimulation. As with drugs, increasing dosage may improve results—but only up to a point. The conditions for this will be unique to every application, but it is possible that practitioners will at some point face trade-offs. For example, raising current to treat migraines might further diminish a patient's attacks, but the stimulation itself could become increasingly uncomfortable. Without larger trials, we cannot fully appreciate either the limitations or potential of this technique.

Given these known unknowns, the research community is deeply concerned about individuals trying to replicate these studies at home. Although the findings in this field are tremendously exciting, there is still much more we have to learn about electric stimulation. In the interim, the public and scientists alike must approach the hype surrounding tDCS with care.

As long as we balance our optimism with caution, however, this research offers enormous benefits. The surge of interest in tDCS has even sparked studies of other bioelectric therapies, such as techniques that apply alternating or pulsed current, which can offer unique benefits to the brain. All these advances could pave new routes to self-improvement. Millions of people who struggle with conditions that have long eluded treatment, such as chronic pain and depression, may finally be aided. To achieve this outcome, clinicians will have to adopt electrical stimulation in their practice. A little further out, putting on a cap for healing and thinking may become as commonplace as popping a pill or sipping your morning coffee.