A leitmotif (/ˌlaɪtmoʊˈtiːf/) is a musical "phrase" or melody, re-used in multiple songs to associate a tune with a person, event, or place.
The extensive use of leitmotifs in Undertale's soundtrack and other sound files helps create a nostalgic mood for the game and often evokes emotional responses in players. Toby Fox has stated that the majority of Undertale's soundtrack was composed using reiterations of free SoundFonts and synths.
Attempts have been made at documenting all of the leitmotifs used in the game; players frequently find new connections, and it may be impossible to list them all conclusively. Every single piece of data is open to interpretation and every single change must be explained in history description.
Timestamps found below are approximate to one second and are sourced from this playlist, which reflects the timing of the official soundtrack.
Once Upon a Time
This leitmotif can be considered as the main theme of Undertale. It's the most common melody of the game, playing in seventeen tracks.
- Once Upon a Time
- Start Menu and Menu (Full) (the background tracks for the Start Menu build upon one another, with five intermediate tracks in between ; the music played in the menu at the end of a True Pacifist playthrough is a slowed rendition of Start Menu)
- Home and Home (Music Box) 0:36-1:44
- Hotel 0:20-1:22
- Can You Really Call This A Hotel, I Didn't Receive A Mint On My Pillow Or Anything 0:14-0:57
- Undertale 0:37-5:58
- The Choice
- Fallen Down (Reprise) 1:18-2:30 syncopated to 3/4
- Hopes and Dreams 0:00-1:29, 1:52-2:14
- SAVE the World 0:35-1:46
- Final Power (Hopes and Dreams reversed)
- Reunited 0:43-3:56
- Bring It In, Guys! 3:47-4:05
- Last Goodbye 0:00-0:25, 0:45-2:15
- Good Night
- Undertale (Unused)
- Undertale PS4 Theme 0:29-1:28
Flowey has two leitmotifs relating to him.
Your Best Friend
This leitmotif occurs in seven songs, and one unused audio file.
- Your Best Friend
- During the tutorial with Flowey, dodging his "friendliness pellets" will cause the track to slow down, consecutively after three times. After the third time, the track will slow down and stop.
- Your Best Nightmare 0:54-1:26, 2:00-2:27, 3:00-3:27
- Finale 0:00-0:40, 0:57-1:52
- Hopes and Dreams 1:18-1:52
- SAVE the World 0:05-0:08, 0:15-0:18, 0:25-0:28, 0:36-0:39, 1:35-1:46
- Last Goodbye 0:29-0:32, 0:39-0:42
- mus_toomuch (this plays after exhausting the random kill counter of an area)
Your Best Nightmare
This leitmotif is used in four songs and one unused audio file. 
- You Idiot
- Your Best Nightmare 0:00-0:16, 0:22-0:53, 1:27-1:54, 2:29-2:54, 3:28-4:00
- Burn in Despair!
Toriel's theme. This song is used in three songs and one song from the demo OST.
- Fallen Down (the track in-game is played 25 cents above C# major in A440 equal-tempered tuning ; the sheet music shown above is written in D major)
- Fallen Down (Reprise) 0:00-1:18
- Bring It In, Guys! 3:34-3:47 syncopated to 4/4
- Empty House
This leitmotif can be considered as the Underground theme, appearing in twelve official songs and 2 unused sound files.
- Waterfall 0:27-1:56
- Quiet Water
- NGAHHH!! 0:34-1:22
- Spear of Justice 0:36-1:55
- An Ending, has a variation of the melody
- Don't Give Up, uses variation
- Respite, uses variation
- But the Earth Refused to Die, uses variation
- Bring It In, Guys! 1:48-2:14, uses variation
- Battle Against a True Hero 0:44-1:35, uses variation
- Undyne Battle (Unused) 0:29-1:17
This leitmotif is related to enemies or dogs. It appears in seven songs and one unused song.
- Enemy Approaching
- Anticipation (bassline) (this song also plays at extremely reduced speeds when battling Monster Kid, during the final encounters with Flowey in New Home, and at the end of a "Soulless" Pacifist playthrough)
- Dogsong, has the variation of the melody (a slowed-down version of this song plays after meeting Endogeny's sparing conditions)
- Temmie Village, also has the variation
- Tem Shop, also has the variation
- Stronger Monsters
- Bring It In, Guys! 0:00-0:34
- Donation Shrine (Boombox)
This leitmotif is used in five songs.
The leitmotif for death. This song is used in two songs, one unlisted song and an unused audio file.
- Determination (this song is sped up, looped, and played over itself, as Flowey laughs at the protagonist for dying to him)
- ASGORE 1:50-2:28 syncopated to 4/4
- It's Raining Somewhere Else (this song is played slightly slower in Sans's Room)
- Song That Might Play When You Fight Sans
- Bring It In, Guys! 0:40-0:46
- Nyeh Heh Heh!
- Bonetrousle (this song is played at an extremely reduced speed when encountering Papyrus for the last time in the Genocide Route)
- Song That Might Play When You Fight Sans 0:33-0:58
- Bring It In, Guys! 0:34-0:53
These leitmotifs have two separate meanings to them.
The theme of Snowdin. Used in six songs.
- Snowy (this song plays when fighting Snowdrake's Mother. It is heavily distorted, changing pitch and speed randomly every few seconds)
- Snowdin Town 0:00-0:56
- Shop 0:00-0:25
- Dating Start! 0:00-0:16, 0:37-0:54, 1:31-1:56
- Dating Fight! 0:00-0:13
- Bring It In, Guys! 0:54-1:16
Used to represent friendship, love or happiness. Used in eight songs.
- Snowdin Town 0:56-1:16
- Shop 0:25-0:50
- Dating Start! 0:16-0:35, 0:54-1:31
- Dating Fight! 0:13-0:35
- Hopes and Dreams 2:15-3:01
- Reunited 3:56-4:25
- Bring It In, Guys! 1:16-1:29
- Run! syncopated to 4/4
- Dating Tense! 0:17-0:25 syncopated to 4/4
- NGAHHH!! 0:00-0:34, has the variation of the melody
- Spear of Justice 0:00-0:36, also has the variation
- ASGORE 2:28-2:36, syncopated to 4/4, also has the variation
- Bring It In, Guys! 1:29-1:48, also has the variation
- Undyne Battle (Unused) 0:00-0:29,1:17-1:30 has the variation of the melody
- Waterfall 0:00-0:27, 1:56-2:07
- Another Medium 0:00-0:51, 0:59-1:21, 1:51-2:10
- CORE has a variation of the melody.
- Death by Glamour, also has variations.
- Bring It In, Guys! also has variations.
Alphys' theme. Used in five songs, one of which was unused.
- Bird That Carries You Over A Disproportionately Small Gap
- She's Playing Piano
- Here We Are syncopated to 5/4
- Alphys Lab (Unused)
Mettaton's main theme. Found in four songs and at least one other sound file.
- It's Showtime!
- Live Report syncopated to 3/4
- Death Report syncopated to 3/4
- Death by Glamour 1:30-1:56
- mus_tv (i.e., Papyrus's TV)
The bassline of It's Showtime! is present in three Mettaton-related songs. It is considered as a separate leitmotif, as it has an entirely different melody.
- It's Showtime! (bassline)
- Can You Really Call This A Hotel, I Didn't Receive A Mint On My Pillow Or Anything
- CORE Approach
Asgore's theme. Used in three songs.
Asriel's theme. Used in five songs.
- Undertale 0:00-2:47, 3:27-6:21 (at times, the melody is barely perceptible among overlapping music. It is heard on a guitar for most of the song, becoming hard to distinguish after 3:27 ; the tune switches to a more audible sample after 4:42, to a quiet background piano at the key change around 5:20, and back to the second SoundFont at 5:57)
- The Choice (imperceptible), as it is a part of Undertale which contains the barely-audible Memory
- Finale 0:40-0:57
- His Theme
Uncommon leitmotifs. 
- The Joystick Config songs - Uwa!! So Temperate♫, ...Holiday♫, and ...HEATS!!♫ - are all variations of each other.
- Home to Home (Music Box).
- Heartache to ASGORE 0:34-1:49.
- Dating Start! to Dating Fight!.
- Spooktune to Spookwave.
- Ghouliday to Jingle Bells.
- Live Report to Death Report.
- CORE 0:34-1:29 to Another Medium 0:52-2:22 and part 5 of Bring It In, Guys! 0:29-1:06
- The basslines of Death by Glamour 0:00-1:05 and Bring It In, Guys! 0:00-0:28 have the same melody, which is a variation of the CORE 0:00-1:01 bassline.
- Oh! One True Love to Oh! Dungeon and For The Fans.
- Battle Against a True Hero 0:00-1:36 to Power of "NEO".
- grandpatemi to the introduction of Metal Crusher.
- MEGALOVANIA to its previous incarnations.
- mus_dogroom to the theme of the Dog Shrine.
- Your Best Nightmare 3:12-3:27 to Terezi's Theme 0:00-1:07
- Gaster's Theme has debatable uses in some songs.
- Sample used in Barrier is used in Amalgam
- Sample used in Ooo is used in Waterfall (0:14-0:25)
- Flowey's Laugh is used in Your Best Nightmare (0:16-0:22)
- mus_smile is Muffet's laugh, sped up, reversed, and looped.
- Multiple songs from the soundtrack use instrument samples from other games.
- ↑ Toby Fox on Twitter (deleted post)
- ↑ (Undertale) Once Upon a Time Leitmotifs - YouTube
- ↑ Undertale Main Menu Music Easter Egg - YouTube
- ↑ I heard that if you sped up “The Choice”... - Tumblr
- ↑ [Version 2 Undertale - All songs with the "Your Best Friend" melody/leitmotif] - YouTube
- ↑ Undertale OST "But Nobody Came" Sped up 1200% - YouTube
- ↑ Your Best Nightmare Leitmotifs - YouTube
- ↑ Fallen Down Leitmotifs - YouTube
- ↑ Ruins Leitmotifs - YouTube
- ↑ Possible Leitmotif? - YouTube
- ↑ Enemy Approaching Leitmotifs - YouTube
- ↑ ibid. beginning at 2:46
- ↑ it's all connected - YouTube
- ↑ Undertale - All songs with the "Ghost Fight" melody/leitmotif - YouTube
- ↑ Undertale - All songs with the "Determination" melody/leitmotif - YouTube
- ↑ sans leitmotifs. - YouTube
- ↑ Undertale - All songs with the "Bonetrousle" melody/leitmotif - YouTube
- ↑ "one of the catchiest songs in the OST, reduced to an eldritch horror." - Undertale OST - Bonetrousle (GENOCIDE) Extended - YouTube
- ↑ Undertale - All songs with the "Snowy" melody/leitmotif - YouTube
- ↑ 20.0 20.1 Undertale - All songs with the "Snowy" melody/leitmotif - YouTube
- ↑ Undertale - All songs with the "Snowdin Town" melody/leitmotif - YouTube
- ↑ Undyne Leitmotifs - YouTube
- ↑ https://youtu.be/iZ9LyLCaoYY?t=2m17s
- ↑ Area Bells Leitmotifs - YouTube
- ↑ See Patient
- ↑ Undertale - All songs with the "Alphys" melody/leitmotif - YouTube
- ↑ It's Showtime! Leitmotifs - YouTube
- ↑ Metal Crusher Leitmotifs - YouTube
- ↑ https://youtu.be/iPT_YvaM7vc?t=35s
- ↑ Undertale - All songs with the "ASGORE" melody/leitmotif - YouTube
- ↑ Undertale - All songs with the "His Theme" melody/leitmotif - YouTube
- ↑ Music similarities 2: Undertale: Finale and His theme - YouTube
- ↑ Minor Leitmotifs - YouTube
- ↑ Undertale: Barrier sped up 90% - YouTube
- ↑ W. D. GASTER "Mus_Smile" Dissected!" - YouTube