Historic Environment Scotland has insisted the new protocol is not a response to any specific threat. They advised visitors and tourists that queuing times may be longer than normal as staff search belongings.
A series of events and venues across the city have clamped down on security procedures following recent terrorist attacks in London and Manchester.
A spokesperson for Historic Environment Scotland said: “We would like to make visitors to Edinburgh Castle aware that we are currently operating random bag searches at the Castle.
“Please note this may result in longer waiting times for entry to the Castle.
“We would like to thank visitors in advance for their patience and understanding.
“It is important to note that this measure does not relate to any specific threat, but is rather part of our ongoing approach to the management and provision of a safe and secure site for our staff and visitors.
“We would encourage visitors to Edinburgh Castle to remain vigilant and inform us of anything they see or feel is suspicious.”
Edinburgh Castle is Scotland’s most-visited paid tourist attraction. It sees millions of visitors walk through its doors every year.