Occipital neuralgia: the electric-shock pain shooting up the back of the head

Last updated September 3, 2026.

Occipital neuralgia is irritation of the occipital nerves (running from the upper neck over the back of the skull): producing sudden, electric-shock or stabbing pains shooting from the skull base up the back of the head to the crown, often on one side. It is commonly mistaken for migraine, it is often linked to neck problems (arthritis, muscle tension, injury), and it is treatable: heat and posture, the nerve-calming medications, the diagnostic-and-therapeutic nerve blocks, and physio for the neck underneath.

What does it feel like?

The signature: paroxysms of sharp, shooting, electric or stabbing pain starting at the skull base and radiating over the back and side of the head (sometimes behind the eye), lasting seconds to minutes, sometimes with a lingering ache between volleys, and with the scalp tender to touch (brushing hair, lying on a pillow can trigger or hurt). Usually one-sided. The distinguishing feel: this is a nerve's pain (electric, shooting, shock-like), not the throbbing of migraine, though the two get confused constantly (and can coexist).

Why does it happen?

The greater and lesser occipital nerves get irritated on their path from the upper neck through the muscle and fascia to the scalp: the causes are neck causes (cervical arthritis, the tight trapezius and suboccipital muscles, whiplash and other injuries, prolonged poor posture, occasionally a tight muscle or a vascular loop compressing the nerve), and often no single cause is found. It is a pain of the neck's junction with the skull, which is why the neck treatment is so often the head-pain cure.

Find answers to your occipital neuralgia

Start a free AI doctor consult →

What actually helps?

When is it an emergency?

Occipital neuralgia is clinic medicine; the headache red flags apply as ever: the thunderclap (worst-ever, instant-onset) headache, the headache with fever and stiff neck, new headache with weakness, numbness, speech or vision change, headache after significant head injury, and the over-50 new headache with scalp tenderness and jaw pain (the giant-cell arteritis pattern). The electric-shock paroxysms themselves, however dramatic, are benign in mechanism. Pymander's escalation routing is built and tested specifically for this class of decision; see the safety architecture working paper.

What a Pymander AI doctor consult looks like

Do you get sudden electric-shock or stabbing pains shooting from the base of your skull up the back of your head, with scalp tenderness?
For two months I have had bursts of electric-shock pain shooting from the base of my skull up the right side of my head, lasting seconds, dozens of times a day. Even brushing my hair hurts. I am 41 and my neck is always stiff from desk work.
Thanks for giving me all this information. Based on what you've said, this is occipital neuralgia: the bursts of electric-shock pain shooting from the skull base up one side of the head, the seconds-long volleys many times a day, and the scalp so tender that brushing your hair hurts are the classic nerve-pain signature, and the chronically stiff desk-neck is the likely source (the occipital nerves run through exactly those tight muscles). It is a benign, treatable nerve irritation, and the treatment has a clear ladder: heat and massage for the muscles, physiotherapy for the neck underneath (the genuine source treatment), the nerve-calming medications if it persists, and the occipital nerve block (an injection that both confirms the diagnosis and relieves for weeks to months) if the ladder needs it. Your GP can start this. Here's your care note to share with your care team.
Care note
Occipital neuralgia, classic paroxysms, desk-neck source
Forty-one-year-old desk worker with chronic neck stiffness: 2 months of dozens-daily seconds-long electric-shock paroxysms from skull base to right hemicranium with scalp allodynia (hurts to brush hair): occipital neuralgia. Plan: heat, massage, posture and pillow ergonomics, physiotherapy (suboccipital release, deep neck flexor work), neuropathic-pain agent if persistent (gabapentin or tricyclic), occipital nerve block as diagnostic-therapeutic next step. Headache red flags restated (thunderclap, fever with stiff neck, neuro deficits, over-50 new headache with scalp tenderness plus jaw claudication = GCA pathway).
View care note →

Illustrative example, not a real member's messages.

Common questions

How is this different from migraine?

The character of the pain separates them: occipital neuralgia is a nerve firing (electric, stabbing, shock-like paroxysms lasting seconds, shooting from skull base to crown, with the scalp itself tender to touch), while migraine is a throbbing, pounding, hours-to-days episode with nausea, light and sound sensitivity, and a whole-body unwellness. The confusion is genuine and common (both can hurt one side and behind the eye, and many people carry both diagnoses), but the distinction changes the treatment: migraine needs its own medications and preventives, while occipital neuralgia responds to the nerve treatments (the block, the neuropathic agents, the neck work). The telltale test at the clinic: the nerve block (numbing the occipital nerve kills the neuralgia pain immediately), and the seconds-long electric quality is the feature to describe.

Why does it hurt to brush my hair or lie on a pillow?

Because the irritated nerve misreads touch as threat: the occipital nerve supplies the scalp's sensation, and when inflamed it lowers its firing threshold so that ordinary touch (the hairbrush, the pillow pressure, the hat, even wind on the hair) triggers pain: the phenomenon is called allodynia (pain from what should not hurt), and it is a hallmark of nerve pain rather than muscle or migraine pain. It is also diagnostically useful: the tender point where the nerve exits at the skull base (pressing it reproduces your shooting pain) is the examination confirmation. The practical notes while it settles: soft brush, avoid the firm pillow edge on the spot, sleep on the other side, and the heat pack on the skull base is the comfort that also treats.

Will the nerve block injection actually help, and what is it like?

The occipital nerve block is a small injection of local anesthetic plus steroid at the nerve's exit point at the skull base, done in clinic in minutes, and it plays two roles at once: diagnostic (if numbing the nerve abolishes your pain, the nerve is confirmed as the source: genuinely useful when migraine and neuralgia blur together) and therapeutic (the steroid quiets the nerve's inflammation, and relief lasting weeks to months is common, repeatable if it returns). The injection itself stings briefly; some get a numb patch or light-headed minutes. For many patients it is both the answer to what is this and the first real relief in months, and it buys the quiet window in which the physio and posture work can fix the neck underneath.

Is my desk job causing this?

Very plausibly a major contributor, and the anatomy agrees with you: the occipital nerves run from the upper neck through the trapezius and the small suboccipital muscles (exactly the muscles that desk-posture locks: the forward head, the hunched shoulders, the chin-poked screen position), and years of that tension irritate, trap, or inflame the nerves on their way through. The countermeasures are the desk-classics, worth doing properly for this: the screen at eye level (killing the forward-head posture), the half-hourly neck movement breaks, the chin-tuck exercise (the deep neck flexor work the physios prescribe), the pillow check (too high or too firm loads the skull base overnight), and the heat-and-stretch evening routine. The nerve is the messenger; the neck is the message.

Will it go away on its own?

Sometimes it genuinely does (post-injury and post-viral cases can burn out over weeks to months), but the commoner course untreated is waxing and waning persistence, and there is no virtue in enduring it: the treatment ladder is benign and effective (heat and physio and posture for many, the nerve-calming medications, the block for the rest), and the sooner the neck source is addressed, the less the nerve learns the pain habit. The pattern to watch rather than wait on: increasing frequency, both sides joining, or any new neurological symptoms. The majority of patients get substantial or complete control with the conservative ladder; the resistant minority has the injection-and-beyond options with good success. This is a fixable problem wearing a dramatic pain.

Could it be something more serious?

The reassurance with the checklist: occipital neuralgia's pattern (electric paroxysms, skull-base origin, scalp tenderness, neck connection) is benign and recognizable, and serious causes of back-of-head pain look different: the thunderclap headache (instant, worst-ever: the bleed), the fever-with-stiff-neck (the infection), the headache with weakness, numbness, or speech change (the stroke), the over-50 new headache with scalp tenderness and jaw pain on chewing (giant-cell arteritis: the vision-saving urgency, and note its scalp tenderness mimics neuralgia's), and the rare structural causes the MRI excludes when the picture is atypical or the block fails. Your age, the electric character, and the desk-neck context all fit the benign nerve story; the list above is the line past which it gets re-examined.

Sources

Pymander is not a replacement for a physician and does not provide medical advice, diagnosis, or treatment.

Free AI doctor, 24/7 by textStart a free AI doctor consult