Spending on measures such as the furlough scheme means the debt figure now equals the value of everything the UK produces in a year.
Total debt hit £2.004tn in July, £227.6bn more than last year, said the Office for National Statistics (ONS).
Economists warned the situation would worsen before improving.
It is the first time debt has been above 100% of gross domestic product (GDP) since the 1960-61 financial year, the ONS said.
The July borrowing figure – the difference between spending and tax income – was £26.7bn, down from a revised £29.5bn in June.
It was the fourth highest borrowing in any month since records began in 1993. The three higher figures were the previous three months.
“The £26.7bn the government borrowed in July was the lowest monthly borrowing figure since March as fiscal support started to unwind. Nonetheless, it is another huge sum and pushes borrowing in the year to date to £150.5bn,” said Ruth Gregory, senior UK economist at Capital Economics.
“That is close to the deficit for the whole of 2009-10 of £158.3bn, which was previously the largest cash deficit in history, reflecting the extraordinary fiscal support the government has put in place to see the economy through the crisis.”
Carl Emmerson, deputy director of the Institute for Fiscal Studies, told the BBC’s Today programme it was “not really a surprise” that the government was borrowing a lot of money, given the size of its efforts to support people hit by the pandemic.
However, he added that interest rates were so low that the government was actually spending less on servicing its debts than had been forecast before the coronavirus crisis.
The ONS cautioned that borrowing estimates were subject to “greater than usual uncertainty”.
It said the June figure had been revised down by £6bn, largely because of stronger than previously estimated tax receipts and National Insurance contributions.
Samuel Tombs, chief UK economist at Pantheon Macroeconomics, said: “Public borrowing remains on course this year to hit its highest share of GDP since the Second World War, despite coming in below expectations over the last couple of months.
“Looking ahead, borrowing looks set to jump temporarily in August, as the government makes the second and last Self-Employment Income Support Scheme payment and funds the Eat Out to Help Out scheme.
“Thereafter, it will decline, as the Coronavirus Job Retention Scheme, which cost £6.9bn to operate in July, is wound down ahead of its closure at the end of October, and firms make a huge VAT payment in March, for sales generated in Q2, as well as in that month.”
However, he added that with borrowing for this financial year expected to be about 17% of GDP, Chancellor Rishi Sunak was likely to be “relatively cautious” in his autumn Budget.