William Shakespeare wrote “To be or not to be”; Prince Hamlet speaks it in Hamlet, act 3, scene 1. Shakespeare is the author, Hamlet is the character, and the line opens a speech weighing suffering, death and uncertainty about what follows.
Shakespeare wrote it; Hamlet speaks it
The answer depends on what “who said it” means. The writer is William Shakespeare. Within the play, the speaker is Hamlet. An actor performing the role speaks Shakespeare’s words as Hamlet; that performance does not make the actor their author.
You can check the speaker label immediately above the passage in the Folger Shakespeare Library’s text of act 3, scene 1. This is a stronger way to settle the attribution than finding the sentence on a quotation graphic.
To be or not to be—that is the question:
Hamlet, in William Shakespeare’s Hamlet, act 3, scene 1
What the question is about
The speech considers whether it is better to endure life’s suffering or bring it to an end. Hamlet imagines death as sleep, then hesitates over what that sleep might contain. The thought of an unknown afterlife complicates what initially sounds like a simple alternative.
Our reading of the passage is that its force comes from this change of direction. Hamlet does not merely announce that life is difficult. He tests an apparent escape, finds uncertainty inside it, and considers how thought can interfere with action. A motivational caption about “making a choice” misses much of that tension.
Where it sits in the scene
Before Hamlet enters, Claudius and Polonius arrange to observe an encounter between him and Ophelia. After the speech, Hamlet addresses her. The surrounding action makes this more than an isolated philosophical essay: it belongs to a play full of watching, concealment and uncertainty about other people’s intentions.
The Folger overview identifies the same line and its speaker. Use the full scene when you need context, and the overview when you need a quick orientation.
How to cite the line
A useful short attribution is: “William Shakespeare, Hamlet, act 3, scene 1; spoken by Hamlet.” If your assignment needs line numbers, take them from the edition you are using. Editions can differ in numbering and presentation, so copying a line number from an unrelated website creates avoidable confusion.
You do not need to reproduce the whole soliloquy to explain the opening. Giving the speaker, work and scene lets a reader locate the words and judge an interpretation for themselves.



