Letters judged unsuitable to give to families were stored with dead soldiers' wills and have now been made available online

On 6 August 1914, just two days after Britain declared war on Germany, Joseph Ditchburn, a private in the Durham Light Infantry, wrote an impeccably neat letter to his mother headed "no address": he was 19, still in barracks in England, and just about to make a momentous journey.

"I am preparing to move to the front, and I am only sorry that I did not see you all before I went but then mother dear do not lose heart I may come back again."

The fearful "may" is the telling word: his letter was one of those the troops were encouraged to write and keep in their pocket books with their wills, so that if the worst happened – and for appalling numbers it would – they could be sent home.

But he had said too much, and his mother never got the letter.

The historian Jon Cooksey, editor of Stand To!, the journal of the Western Front Association, believes the details Ditchburn innocently betrayed, including the date his regiment moved to the front, and the faltering morale he reported so honestly, meant it was censored and stored with his will instead of being posted.

Thousands more judged equally unsuitable can now be read for the first time by descendants of the soldiers. The last letters have resurfaced among 278,000 first world war English and Welsh soldiers' wills – those of officers and Scottish and Irish soldiers are archived separately – at Iron Mountain, a high-security storage centre on the outskirts of Birmingham.

From Thursday they will be available online, through a joint project by the storage firm and Her Majesty's court and tribunal service: anyone can search the index by name, date or regimental number, and then pay a statutory £6 fee for a copy of any will. Iron Mountain has digitised everything in each record, so any letters, and the official envelopes recording the date and cause of death, will also be supplied.

Cooksey knew the wills survived, but had no idea that so many of the last letters were stored with them, and regards them as a priceless resource. He has already tracked the grandfather of Mick Fleetwood of Fleetwood Mac, and discovered that he did not die in a futile assault on the Turkish lines at Gallipoli, as the rock musician believed, but months later in a Maltese hospital of dysentery. He has also found Albert Butler, who gave his occupation as "professional footballer" when he enlisted – he had played for first Reading and then QPR – left everything to his wife Kate, and died perhaps mercifully after his left leg was blown to pieces: "bad, no more football for me" he said to the chaplain, who later wrote to the widow.

The simple wills, which were legally accepted without being witnessed, were essential because the War Office knew the casualties would be huge.

Prof Peter Simkins, president of the Western Front Association, a former senior historian at the Imperial War Museum, who was moved to find the will of his own great uncle, Frank Hill, said that in the periods of greatest losses, in 1917, the equivalent of three infantry battalions were killed or injured every day.

The wills rarely specify more than "all my possessions" but the letters fill out the picture, often in poignant detail. Ditchburn had already sent back his portmanteau with all his clothes, and taken his bicycle to be repaired. "It is a very nice machine and worth a lot of money, and I have paid for its repair, if there is anything extra to pay, pay for it, as I have made my will out leaving everythis [sic] I possess and money the war office has for you."

As if the mention of his fine bicycle reminds him that he will probably never ride it again, the tone of determined optimism disappears.

"Oh it is simply deffning [sic] here with the noise of people rushing to see their wives and mothers before they go away, it is very pitiful to see great big men fainting in the ranks, it make one lose heart when he sees this.

"And mother dear do have courage, I will be alright, there are thousands of other mothers & relations in the same circumstances and if I do die I will die with a good heart and all your love upon my lips."

The envelope in which it was stored records that Ditchburn barely lasted two months, dying "of wounds" on 10 October.

Harry Lewis Lincoln wrote to "my dearest Clara" on 12 August 1914 when his first Bedfordshire regiment was in Ireland. "Friday morning we are going round the coast straight to Belgium. I am not supposed to tell you this."

Cooksey has traced a sad, hard history. At the age of three Lincoln was "a lodger" with a couple near Eye in Suffolk, and 10 years later one of the oldest residents of a children's home. In 1914 he was already an enlisted soldier, but Cooksey can find no record of a marriage to Clara, or of the birth of "the boy".

His letter was strikingly short on conventional pieties: "We have been issued with a little tin disc with our number, name and regiment on which we have to wear round our necks so they can tell who we are if we get killed."

Fearful as the future might be, he was thoroughly fed up with the last weeks in barracks: "This is a place to be in, we have to fight like tigers to get our food here soon as ever it comes up … some get a lot and some don't get any. If we have money it is a hard job to spend it, if you go the coffee shop or canteen you have to wait about two hours before it is your turn to be served. If I get through this lot, no more for me."

With striking prescience, he wasted no time on morale-boosting cliches. He knew it would not all be over by Christmas. "Dear, this war is going to be worse than I thought, some seem to think it won't last a month and some say it will last three years, our officers told us this morning it would be a hard and long war.

"If I get killed in active service there will be a medal for me somewhere and I hope you will try and get it and keep it for the boy to wear when he grows up."

He ends with a heartbreaking reminder that the world he was leaving continued without him: "Remember me to the men in the harvest – tell them I am alright so far."

By the spring he was at Ypres, where he was killed in action on 5 May 1915, aged 26. He has no known grave. If Clara's descendants apply for a copy of his will, they will read his last letter for the first time, a century after the harvest was gathered in.