In the special programme, Charles and Camilla will surprise the residents of Albert Square at a street party held to celebrate the monarch’s 70 years on the throne.
The royal couple filmed the scenes in March when they visited the new Elstree set and met the cast and crew of the long-running BBC soap opera.
Viewers have already seen Mick Carter, played by Danny Dyer, decide to throw a Jubilee party for the Square.
He will later tease that some very special guests will be in attendance but the partygoers will be left in shock when they are graced by the royals in an episode airing on June 2.
Mick and Linda Carter, played by Kellie Bright, will greet Charles and Camilla at the party and introduce them to the residents of Walford.
Speaking about her brush with royalty, Bright said: “I did think what amazing sports that they are just willing to do it.
“I just thought, ‘Wow, they’ve never done anything like this before’. They didn’t really know what to expect, I mean it must have been nerve-wracking for them and completely out of their norm.
“So I just hope they enjoyed it as much as we did.”
Executive producer Chris Clenshaw added: “We are truly honoured to have both the Prince of Wales and the Duchess of Cornwall appear in what is set to be one of EastEnders’ most special episodes.
“Linda Carter is naturally in her element and giddy with excitement as their Royal Highnesses arrive in Walford, but it wasn’t just her, as for all of us at EastEnders it was an extremely special day that will go down in EastEnders’ history.”
In 2001, the Queen visited soap queen Dame Barbara Windsor, who played Peggy Mitchell, on the EastEnders set.
The royal visitor stepped behind the Queen Vic, strolled around Albert Square and through the EastEnders street market, meeting stars of the show.
The special Jubilee episode featuring Charles and Camilla is due to air on June 2.
Meanwhile an insurance giant has delved back 70 years in its archives to reveal more about what everyday life was like then, to mark the Queen’s Platinum Jubilee celebrations.
Aviva’s records reflect how homes and pastimes have changed over the decades.
Seventy years ago, the tech cover available included “wireless” (radio) and television installation insurance for households owning such items, Aviva said. Cover extended to accidental death or injury caused by these devices to any person not belonging to the household.
Anna Stone, group archivist for Aviva, said: “Our documents from 1952 reveal a world where TVs were luxuries and therefore benefited from their own insurance; cattle and horses were more common on UK roads and it wasn’t unheard of to take a typewriter on holiday.”
Looking at home insurance, Aviva found that comprehensive household insurance offered protection against events still seen today, such as fire, burglary and storms – although some of the 1952 policy wording has fallen out of favour, including cover for “thunderbolt”, “larceny” and “tempest”.
Flood damage was excluded, although nowadays Aviva does cover this, using risk-mapping technology to assess the likelihood of flooding.