An investigation into the conditions of Chinese workers has revealed the shocking human cost of producing the must-have Apple iPhones and iPads that are now ubiquitous in the west.

The research, carried out by two NGOs, has revealed disturbing allegations of excessive working hours and draconian workplace rules at two major plants in southern China. It has also uncovered an "anti-suicide" pledge that workers at the two plants have been urged to sign, after a series of employee deaths last year.

The investigation gives a detailed picture of life for the 500,000 workers at the Shenzhen and Chengdu factories owned by Foxconn, which produces millions of Apple products each year. The report accuses Foxconn of treating workers "inhumanely, like machines".

Among the allegations made by workers interviewed by the NGOs – the Centre for Research on Multinational Corporations and Students & Scholars Against Corporate Misbehaviour (Sacom) – are claims that:

■ Excessive overtime is routine, despite a legal limit of 36 hours a month. One payslip, seen by the Observer, indicated that the worker had performed 98 hours of overtime in a month.

■ Workers attempting to meet the huge demand for the first iPad were sometimes pressured to take only one day off in 13.

■ In some factories badly performing workers are required to be publicly humiliated in front of colleagues.

■ Crowded workers' dormitories can sleep up to 24 and are subject to strict rules. One worker told the NGO investigators that he was forced to sign a "confession letter" after illicitly using a hairdryer. In the letter he wrote: "It is my fault. I will never blow my hair inside my room. I have done something wrong. I will never do it again."

■ In the wake of a spate of suicides at Foxconn factories last summer, workers were asked to sign a statement promising not to kill themselves and pledging to "treasure their lives".

Foxconn produced its first iPad at Chengdu last November and expects to produce 100m a year by 2013. Last year Apple sold more than 15m iPads worldwide and has already sold close to five million this year.

When the allegations were put to Foxconn by the Observer, manager Louis Woo confirmed that workers sometimes worked more than the statutory overtime limit to meet demand from western consumers, but claimed that all the extra hours were voluntary. Workers claim that, if they turn down excessive demands for overtime, they will be forced to rely on their basic wage: workers in Chengdu are paid only 1,350 yuan (£125) a month for a basic 48-hour week, equivalent to about 65p an hour.

Asked about the suicides that have led to anti-suicide netting being fitted beneath the windows of workers' dormitories, Woo said: "Suicides were not connected to bad working conditions. There was a copy effect. If one commits suicide, then others will follow."

In a statement, Apple said: "Apple is committed to ensuring the highest standards of social responsibility throughout our supply base. Apple requires suppliers to commit to our comprehensive supplier code of conduct as a condition of their contracts with us. We drive compliance with the code through a rigorous monitoring programme, including factory audits, corrective action plans and verification measures."

• This story was amended on 1 May 2011 to correct the name of The Centre for Research on Multinational Corporations