Researchers using digital technology on two pages of Anne Frank’s diary covered over with brown masking paper have discovered passages featuring four risque jokes and candid explanations of sex, contraception and prostitution.

“Anyone who reads the passages that have now been discovered will be unable to suppress a smile,” said Frank van Vree, the director of the Netherlands Institute for War, Holocaust and Genocide Studies. “The dirty jokes are classics among growing children. They make it clear that Anne, with all her gifts, was above all also an ordinary girl.”

Anne, then 13, wrote the two pages on 28 September 1942, less than three months after she, her family and another Jewish family went into hiding from the Nazis in a secret annex behind a canalside house in Amsterdam.

Later on, she covered them over with brown paper, and their content remained a mystery for decades.

It turns out the pages contained four jokes about sex that Anne herself described as “dirty” and an explanation of women’s sexual development, sex, contraception and prostitution.

Anne Frank spent two years with her family and another Jewish family in a secret annex behind a canal-side house in Amsterdam. Photograph: AFP/Getty Images

“They bring us even closer to the girl and the writer Anne Frank,” said Ronald Leopold, the executive director of the Anne Frank House museum.

Experts said the newly discovered text, when studied together with the rest of her diary, reveals more about Anne’s development as a writer than it does about her interest in sex.

Leopold said the words were similar to other passages dealing with sex that already had been published.

However, it provides an early example of how Anne “creates a fictional situation that makes it easier for her to address the sensitive topics that she writes about”, he added. In her diary, for example, she addressed entries to a fictional friend named Kitty.

The deciphering was done by researchers from the Anne Frank Museum, the Institute for War, Holocaust and Genocide Studies and the Huygens Institute for the History of the Netherlands.

They photographed the pages, backlit by a flash, and then used image-processing software to decipher the words, which were hard read because they were jumbled up with the writing on the reverse sides of the pages.

In the passage on sex, Anne described how a young woman gets her period around 14, saying that it is “a sign that she is ripe to have relations with a man but one doesn’t do that of course before one is married”.

On prostitution, she wrote: “All men, if they are normal, go with women, women like that accost them on the street and then they go together. In Paris they have big houses for that. Papa has been there.”

Anne wrote her diary while she and her family hid for more than two years. The family was provided with food and other essentials by a close-knit group of helpers, until 4 August 1944 when they were discovered and ultimately deported to Auschwitz.

Only Anne’s father, Otto Frank, survived the war. Anne and her sister died in Bergen-Belsen camp. Anne was 15.