Is there alliteration in the soliloquy "To be or not to be" from Hamlet?
There is very little alliteration in this soliloquy. This means that the few brief alliterative phrases there are stand out in sharp relief, emphasizing the complement or contrast between two words. In the first few instances, it is a complement, for the two words agree with and support one another. This is the case with the frightening dreams Hamlet imagines in the phrase "in that sleep of death what dreams may come" and the more compact and commonplace phrase "long life."
Hamlet then asks why anyone would tolerate this long and dreary life at all:
When he himself might his quietus make
With a bare bodkin?
This is not particularly heavy alliteration, a repeated "h" in one line sounding almost like a stutter, followed by the strong, explosive repeated "b" in the next line, providing the solution. The alliterative phrase that follows refers back to the dreams that may come in death. This time, Hamlet talks fearfully of "the dread of something after death," for those dreams, in his view, are all too likely to be nightmares.
Finally, we have a contrast between the two alliterative words in the phrase "conscience does make cowards of us all." Conscience is generally considered to produce courage, actuating the conscientious person to stand up for principle regardless of the consequences. Hamlet, however, is too scrupulous and uses the contrast here to highlight the way in which his conscience has betrayed him into cowardice.