'Our people have many lice in their clothes, and they bite terribly. They are worse than a rifle bullet. But there are no mosquitoes or other creatures which bite mankind, and no snakes or scorpions at all." This extract is from a letter by an Indian soldier in 1915. He is in France and writing home to a friend. The letter comes from a collection of correspondence copied by British military censors, revealing the experiences of the many Indian soldiers who fought in the first world war, that has just been digitised by Europeana 1914-1918 and the British Library. The collection also contains the censors' summaries of the letters, revealing their concerns.

By the time of the Armistice, India had provided more than 1.27 million men. The Indian army at this time was drawn mainly from the middle peasantry, recruited from the north and north-west of India partly on account of the "martial races" theory of the British which suggested that some races or castes were inherently more warlike than others. Most Indian soldiers in France were Punjabi Muslims and Sikhs. My family are Sikhs from Punjab, and my maternal grandfather served in the Indian army in the 1930s. I don't know if my family had any further involvement in the first world war, but, for me, these letters provide a valuable link to the history of my ancestors and their positive involvement with the empire.

In their letters, the soldiers persistently express gratitude for the food and clothing provided by the British; this may be due to the Indian soldiers' Comfort Fund (ICS), an English charity established in 1914 to supplement provisions for Indian soldiers, especially while they were in hospital. "Do not worry about me, for I am in paradise," wrote one soldier. "The King came down here last week & shook hands with all the Indians, & asked each one about his wounds & sufferings & gave consolation to each. To-day I saw a museum in which all the living fishes of the world were kept in boxes of water, & a magnificent palace which cost millions of pounds." The wounded Indian was at Brighton Pavilion, which had been turned into a hospital for Indian soldiers. For most of them, from a rural background, the sight of European cities such as London, Brighton and Paris must have been inspiring: "What beautiful cities, pleasant gardens, rivers, streams, houses, shops, roads, carriages, cows, horses, fowls, ducks. Whatever one sees is different from our country. What manners, what conduct, what discipline, etiquette and energy." A soldier in Paris simply says: "What is Paris? It is heaven!" There are also the occasional complaints: "As for the bread, I must tell you that the bakers burn it too much on the outside and leave it raw within … " Soldiers from all backgrounds served, fought and ate side by side: "Many distinguished people here have given up making any distinction between clean and unclean things, and I suppose there is not one per cent of them who refuse to eat with the French."

As many soldiers were illiterate, their letters were often written by those Indian soldiers who could write, and would have been sent to an illiterate recipient who would have sought a third party to read the letter to them. The next layer of filtration was the censorship which happened at two levels as David Omissi explains in Indian Voices of the Great War: "In the first place, the letters were censored within the regiment. British officers read their men's letters, or asked a trustworthy Indian officer to read themaloud. This was done in order to remove information of military value to the enemy, such as mentions of place names near the front line." He goes on to describe how the head censor and his team, based at Boulogne, would then read some of these letters and write a brief report on their contents, to each of which the censors would append in the region of 100 translated extracts. The British Library's digitised collection is made up of these extracts, with black marks barely covering the redacted passages. The censors provided an important function, not just in vetting letters for breaches of security, but also in helping to ensure that any issues concerning the soldiers' physical and emotional well-being could be addressed. For instance, the religious tension in this letter forwarded by the head censor for special attention: "I am sorry to say that this is an evil country, because they bury Hindus and Musalmans [Muslims] in one place." The censor also, however, expressed frustration with these inscrutable foreign troops in his summaries: "Orientals excel in the art of conveying information without saying anything definite … they are apt to use the phrase 'Think this over till you understand it'… This phrase is becoming increasingly common in letters from all sources." If the censors were suspicious, so too were the soldiers, who would have known their letters were being read: "It is to be hoped that Uncle Censor will forward this letter on safely."

The emotion that comes through many of the letters suggests their unaffected style. Soldiers frequently convey the horror of war on a European field of battle. One letter simply lists the range of destruction: "Poisonous gases, bombs, machine guns which fire 700 bullets per minute, large and small cannon throwing cannon balls 30 Bengali maunds in weight, Zeppelins, large and small flying machines which throw bombs from the air … liquid fire that causes the body to ignite." Another soldier writes home: "No man can return to the Punjab whole. Only the broken limbed can go back." Many write with terror: "There is no telling whether the war will be over in two years or in three, for in one hour 10,000 men are killed. What more can I write?" A report from the censor from the summer of 1915 conveys the tragedy the Indians were enduring back home: "Deaths from plague in the Punjab have of late been at a rate of well over 2000 a day … It is not surprising, therefore, that the men whose homes are in the infected districts should find their letters gloomy reading."

Soldiers refer to their own classic books where good is pitted against evil: "Having seen this war, all that has been written in Mahabharat and in the Ramayan is altogether true." The German aeroplanes are compared to Vishnu's mighty eagle, the Garuda, who features in the Ramayana. Soldiers refer to demons, "The name of Germany is breathed throughout the world like the name of Harankash", or to Indian heroes, "The mud is up to a man's knees, and the trenches are full of water up to a depth of about 2 feet. As in the history of Ala [a great Sikh warrior]". Another Sikh refers to drinking tea as drinking amrat, a spiritual drink. There is even a sonnet from a soldier swearing allegiance to the king, which begins with declamatory vigour: "Our Lord the King is wondrous kind / May God the wreath of victory bind / Upon his brow." The speaker continues in rousing rhyming couplets where the British soldiers will "Like tigers, spring upon the prey / And tear the German goat away." Pastoral imagery abounds and connects us to the rural world of Punjab: "As a man climbs a plum tree and shakes down the plums [so that] they fall and lie in heaps, so are men here fallen …" The censor's recommendations reveal the religious zeal of many of the soldiers: "Qurans, extracts from the Granth [Sikh holy book] … Brahmanical threads and the like would give more pleasure than a great deal of sweetmeats and tobacco." This religious austerity is repeated time and again: "Death is ruled by time and both by battle, and if it be death, then welcome death." Soldiers fought for their faith and as much for their izzat. To return home a hero would be to preserve the honour of a family, a caste, a village or of the faith. Even death gives izzat to Muslims, who by dying in battle become "dwellers in Paradise".

The letters are deeply affecting. A moment of wonder, for example, is captured by a Muslim soldier writing of having escaped from prison on a horse in France and arriving for a feast to celebrate Fatiha. "It was held in a coffee shop, and there was a big table in the middle covered with vases of flowers. Lamps and candles were burning. There were French pictures on the walls, and chairs, and little tables all round the room … and everyone was wearing his boots." The soldier hints at the awareness that his presence arouses in the local community: "There was a crowd of French women and children at the doors looking in, and the scene lasted for an hour and a half." Now we too can look in at the experiences of this extraordinary group of men, such as the soldier writing home: "I am like a soap bubble, and have no hope of life! How many days is it since I was separated from you, star of my eyes. But you must realise that this is the time for brave men."

• The British Library's collection of war correspondence is available online at www.bl.uk/world-war-one.