Further reading: The Queen's sorrow over unsloved murder of Martine Magnussen
In a message to King Harald, the Queen said her thoughts and those of her husband the Duke of Edinburgh were with the Norwegian people.
It comes as the UK's Foreign and Commonwealth Office urged British citizens in Norway to stay indoors in the wake of the atrocity.
Updated travel advice to the country warned there was a high threat from terrorism and called on British nationals to take extra care.
In her letter to King Harald, the Queen said: "I am deeply saddened and shocked by the tragic loss of life of so many people on the island of Utoya and in Oslo.
"Prince Philip joins me in extending our heartfelt sympathy to Your Majesty and the people of Norway. Our prayers and thoughts are with everyone who has been affected by the dreadful atrocity."
Continue reading: The Queen's 'shock & sadness'