Why Do I Constantly Hear Music in My Head?

Most people who hear music playing in their head on a regular basis are experiencing what researchers call involuntary musical imagery, or INMI, the scientific term for an earworm. Roughly nine out of ten people report this happening at least once a week, and for many it is a near-daily occurrence. Earworms are overwhelmingly harmless. But “constantly” is a word that matters here, because the line between a catchy chorus looping in the background and music that never stops, feels uncontrollable, or sounds like it is coming from outside your own mind separates a universal quirk of human cognition from a handful of medical conditions worth knowing about.

Earworms Are Nearly Universal

If you feel like you always have a song rattling around your head, you are in very good company. In a large survey of over a thousand participants, about 89% reported experiencing involuntary musical imagery at least once a week.1Psychology of Music. Musical activities predispose to involuntary musical imagery That figure has held up across multiple studies and different countries, though the exact rates vary by culture. Among Iranian university students, for instance, around 83% reported weekly earworms, which was somewhat lower than rates found in European and American samples but higher than those in Chinese populations.2PubMed Central. Validation of the Persian Involuntary Musical Imagery Scale alongside multifaceted investigation of earworms among Iranian college students The broad picture is the same everywhere: earworms are a basic feature of having a human brain that processes music.

Earworm frequency tends to be higher in people who listen to more music, play an instrument, or have stronger emotional connections to particular songs. That makes intuitive sense. The more raw musical material your brain has absorbed, the more it has to spontaneously replay. People who describe themselves as constantly hearing music in their heads often fit this profile: heavy listeners, musicians, or people who work in environments where music is always on.

What Your Brain Is Actually Doing

An earworm is not your ears playing tricks on you. It is your auditory cortex activating in the absence of actual sound, running a kind of offline rehearsal of music it has encoded. Brain imaging research has found that the frequency of earworms is linked to the physical structure of several brain regions, including parts of the right frontal and temporal cortices, the anterior cingulate cortex, and the left angular gyrus.3ScienceDirect. Tunes stuck in your brain: The frequency and affective evaluation of involuntary musical imagery correlate with cortical structure In plain terms, people whose brains have thicker cortex in regions tied to perception, memory, and emotion tend to get earworms more often. The networks involved overlap substantially with those active during mind wandering and daydreaming.4PubMed Central. Brain Connectivity Networks and the Aesthetic Experience of Music

This matters because it explains why earworms tend to strike when your mind is idle, during a commute, in the shower, while doing dishes. Your brain defaults to internally generated activity whenever external demands drop. For a musically saturated brain, that default often takes the form of a melody. It is not a malfunction. It is the brain doing what it does during downtime, replaying stored patterns. The emotional valence of the earworm also maps onto brain structure: how much you want to suppress the inner music versus how much you enjoy it relates to gray matter volume in regions tied to emotion and memory.3ScienceDirect. Tunes stuck in your brain: The frequency and affective evaluation of involuntary musical imagery correlate with cortical structure

What Makes a Song Stick

Not every song you hear becomes an earworm. Research has identified several features that make a tune more likely to lodge itself in your head. Recency is a big one: songs you heard within the last few hours or days are the most common earworm candidates. Familiarity is another, because your brain has had more opportunities to encode a well-known song deeply. Beyond personal exposure, the musical structure itself plays a role. Songs with simple, repetitive melodic contours, upbeat tempos, and unexpected intervals tend to get stuck more often.5PubMed Central. Involuntary musical imagery as a component of ordinary music cognition: A review of empirical evidence Think of the kind of pop hook designed to be instantly memorable: that is, essentially, a song engineered to become an earworm.

Emotional state matters too. Stress, fatigue, and boredom all seem to increase earworm frequency. So does being in a low-demand cognitive state, as mentioned earlier. Some personality traits track with more frequent earworms as well, particularly openness to experience and a tendency toward absorption, the ability to get deeply lost in an experience. If you are someone who gets pulled into movies, books, or music easily, you are also the type whose brain is likely to keep replaying that music after the headphones come off.

Cross-Cultural Differences in Earworm Experience

Earworms are found everywhere researchers have looked, but the rate at which people report them varies across cultures. About a quarter of Iranian college students in one study said they experienced earworms daily, compared with higher rates in African samples and lower rates in Chinese ones.2PubMed Central. Validation of the Persian Involuntary Musical Imagery Scale alongside multifaceted investigation of earworms among Iranian college students These differences probably reflect a mix of how much ambient music people are exposed to in daily life, the role music plays in a given culture, and how people interpret the survey questions. The core phenomenon appears consistent: once the brain encodes music, it replays it involuntarily. But the frequency and the degree to which people find it noteworthy enough to report varies.

When Inner Music Becomes a Hallucination

Here is where the picture shifts. Earworms happen inside your head and you know it. You recognize the music as internally generated, you can usually push it aside with effort, and it feels like a thought, not like sound in the room. Musical hallucinations are different. People who experience them perceive actual music as if it were being played externally. They might check whether a radio is on or ask others if they hear it too. The music is not under voluntary control and often cannot be dismissed.

A phenomenological survey comparing the two found that musical hallucinations occur less often than earworms, feel less controllable, contain fewer lyrics, and tend to involve less familiar music.6PubMed Central. Musical hallucinations, musical imagery, and earworms: A new phenomenological survey Interestingly, people with more musical expertise were less likely to report musical hallucinations, even though they tend to get more earworms. That distinction is telling. Earworms are an extension of normal musical processing, fueled by deep exposure. Musical hallucinations recruit different processes, ones that cross the line into perceptual experience without a corresponding external sound.

Musical hallucinations are rare in the general population, reported in roughly 0.16% of a general hospital population in one study.7PubMed Central. “Doctor, I Hear Music”: A Brief Review About Musical Hallucinations But among certain groups, they are more common, particularly older adults with hearing loss.

Hearing Loss and the Brain Filling the Silence

One of the most well-documented triggers for musical hallucinations is hearing loss. When the auditory system receives less input from the ears, the brain can start generating its own auditory experiences to fill the gap, a process sometimes called deafferentation. The same principle explains some cases of tinnitus, where the brain generates phantom ringing or buzzing. Musical hallucinations take this a step further: instead of a simple tone, the brain produces organized melodies.

Research has found that tinnitus and musical hallucinations share a common underlying neural mechanism, but musical hallucinations also recruit additional brain regions involved in music and language processing, including areas on the right side of the brain associated with melody and tonal patterns.8PubMed Central. Detailed clinical characteristics of musical hallucinations in 81 patients 9PubMed Central. Musical Hallucinations in Chronic Pain: The Anterior Cingulate Cortex Regulates Internally Generated Percepts In other words, the brain is not just generating noise; it is composing. The risk factors for this type of hallucination include older age, female sex, social isolation, and significant hearing impairment.10PubMed Central. Musical Hallucinations in an Elderly Female With Hearing Loss

For people in this category, hearing aids can sometimes help by restoring external auditory input and reducing the brain’s tendency to generate its own. But not always. In one case report of an 82-year-old woman who developed musical hallucinations after the onset of hearing loss, treatment attempts with several medications, including gabapentin, quetiapine, and donepezil, failed to resolve the symptoms.10PubMed Central. Musical Hallucinations in an Elderly Female With Hearing Loss Musical hallucinations driven by hearing loss can be stubbornly persistent, and they often cause significant distress because the person knows the music is not real but cannot stop it.

Musical Obsessions and OCD

Between ordinary earworms and true hallucinations sits another category that gets less attention: musical obsessions. These occur in some people with obsessive-compulsive disorder and are sometimes called “stuck song syndrome.” The distinguishing feature is that the music is internally generated (like an earworm) but persistent, intrusive, time-consuming, and causes real distress or functional impairment.11European Psychiatry. A very musical psychopathology – from intrusive musical imagery, to musical obsessions and hallucinations The person recognizes the music as their own thought, so it is not a hallucination. But unlike a typical earworm, which fades on its own or responds to distraction, a musical obsession loops relentlessly and resists all attempts at dismissal.

If you find that the music in your head is not just frequent but genuinely interfering with your ability to concentrate, sleep, or function, and if it provokes anxiety or a desperate urge to make it stop, this is worth mentioning to a clinician. Musical obsessions can respond to the same treatments used for other forms of OCD, including certain medications and cognitive-behavioral approaches. The key differentiator from a normal earworm is not how often the music plays but how much distress it causes and how little control you have over it.

Neurological and Epilepsy-Related Causes

Musical hallucinations can occasionally be a symptom of a neurological condition. Epilepsy is one of the better-studied examples. Musical hallucinations in epilepsy can take several forms: they may be part of a seizure aura, occur during a seizure itself, or appear between seizures. They are frequently linked to abnormalities in the temporal lobe, the part of the brain most involved in processing sound.12PubMed Central. Musical hallucinations and their relation with epilepsy Brain lesions, including tumors in the temporal region, have also been documented as causes. One review found that epilepsy accounted for roughly 11% of musical hallucination cases overall, and these were primarily associated with lesions in the left temporal cortex.13American Epilepsy Society. Musical hallucinations as presenting symptom in left-temporal glioma: case report and review of literature

This sounds alarming, but context matters. Musical hallucinations from epilepsy or brain lesions almost never appear in isolation. They come alongside other neurological symptoms like seizures, headaches, confusion, or language difficulties. If you are a generally healthy person whose main complaint is a catchy song that will not leave, epilepsy is extremely unlikely to be the cause. But if the music appeared suddenly, feels completely involuntary, sounds external, and is accompanied by other new symptoms, a neurological evaluation is reasonable.

Medications That Can Trigger Musical Hallucinations

A number of medications have been linked to musical hallucinations as a rare side effect. A review of drug-induced cases found that antidepressants were the most commonly implicated class, involved in about 18.5% of reported cases, followed by anti-Parkinson drugs, opioids, ketamine, and the antifungal voriconazole, each accounting for around 11%.14PubMed Central. Drug-induced musical hallucination Benzodiazepines, certain antibiotics, and vasodilators made up most of the remainder, with isolated reports linked to corticosteroids, aspirin, and alcohol withdrawal.

Tramadol, an opioid pain reliever commonly prescribed after surgery, provides a concrete example. While hallucinations in general are a recognized side effect, specifically musical hallucinations are extremely rare and poorly documented with this drug.15PubMed Central. Can’t Stop the Music? Musical Hallucinations From Postoperative Tramadol Use: Case Report and Literature Review The rarity makes this easy to overlook, which is exactly why it is worth knowing about. If you started hearing persistent music in your head after beginning a new medication, that is worth reporting to your prescriber. In many drug-induced cases, the hallucinations resolve after the medication is stopped or the dose is adjusted.

Vivid Mental Imagery and Individual Differences

People vary enormously in how vivid their internal mental imagery is, and this applies to auditory imagery as much as visual imagery. At one end of the spectrum sit people with hyperphantasia, who experience extremely vivid mental images; at the other end, people with aphantasia, who have little or no voluntary mental imagery at all. Research suggests roughly 3% of the population falls into the hyperphantasia range and about 1% into the aphantasia range.16Trends in Cognitive Sciences. Aphantasia and hyperphantasia: exploring imagery vividness extremes

While most of the research on these extremes has focused on visual imagery, the auditory equivalent exists too. If you are someone who can “hear” a song in your head with startling clarity, complete with specific instruments, vocal texture, and dynamics, you likely have strong auditory imagery. This does not mean anything is wrong. It does mean your brain is particularly good at internally reconstructing sound, which may make earworms feel more vivid and harder to shake compared to someone whose inner jukebox is fuzzier. The vividness of your earworms is as much about your brain’s imagery capacity as it is about the song itself.

Practical Ways to Quiet an Earworm

For ordinary earworms, the kind that are annoying but not distressing, a few evidence-based strategies can help. One of the most surprising findings comes from research on chewing gum. In controlled experiments, chewing gum reduced both voluntary and involuntary musical thoughts, and the effect was specific to the motor act of chewing rather than a general distraction effect.17PubMed. Want to block earworms from conscious awareness? B(u)y gum! The likely explanation is that chewing engages the same articulatory motor planning circuits your brain uses to silently “sing along” with the earworm. By occupying those circuits with a competing motor task, you essentially jam the signal.

Other approaches that people commonly report as helpful include:

  • Listening to the full song: Earworms tend to loop a fragment rather than the complete track. Playing the song through to the end can give your brain the closure it seems to be seeking.
  • Engaging in a verbal task: Anything that demands verbal or phonological processing, like doing a crossword, reading aloud, or having a conversation, competes with the internal rehearsal loop.
  • Switching songs deliberately: Replacing the stuck song with a different one can break the loop, though you risk just trading one earworm for another.
  • Accepting it: Paradoxically, actively trying to suppress an earworm can make it more persistent, the same way trying not to think about something makes you think about it more. Letting the music play without fighting it often allows it to fade on its own.

For musical hallucinations, strategies are different and often more difficult. When hearing loss is the driving factor, improving auditory input through hearing aids or cochlear implants sometimes reduces the hallucinations by giving the brain real sound to process. Enriching the auditory environment with background music, radio, or podcasts can also help by competing with the internally generated music. Pharmacological treatment has had mixed results. While antipsychotics and certain other medications are sometimes tried, case reports frequently document treatment resistance.10PubMed Central. Musical Hallucinations in an Elderly Female With Hearing Loss Reassurance, though, can be genuinely therapeutic: many people with musical hallucinations are terrified they are “going crazy,” and learning that the phenomenon has a well-understood neurological basis can reduce the distress substantially, even when the music itself persists.

How to Tell Where You Fall on the Spectrum

For most readers, the answer to “why do I constantly hear music in my head” is straightforward: you have a musically active brain, you are exposed to a lot of music, and your auditory imagery is doing exactly what it evolved to do. If the music is a recognizable song you heard recently, you know it is in your head and not in the room, and you can shift your focus away from it when you need to (even if it comes back), that is a normal earworm. No evaluation needed.

A few features should prompt a conversation with a healthcare provider. If the music sounds like it is coming from outside your head and you genuinely cannot tell whether it is real, that shifts toward hallucination territory. If the onset was sudden and accompanied by hearing changes, new neurological symptoms, or a recent medication change, a medical workup is worthwhile. And if the music is causing significant distress, dominating your attention for hours at a time, or preventing sleep in a way that feels impossible to override, that edges toward musical obsession or hallucination and deserves clinical attention regardless of what label fits best.

The five most commonly identified causes of musical hallucinations in the medical literature are hearing loss, psychiatric disorders, focal brain lesions, epilepsy, and drug effects.13American Epilepsy Society. Musical hallucinations as presenting symptom in left-temporal glioma: case report and review of literature Of these, hearing loss in older adults is by far the most common scenario. The vast majority of people searching this question, though, do not have any of these conditions. They have earworms, the same earworms nearly everyone on the planet experiences, just perhaps a bit more often or more vividly than average.