Pensions currently rise by the highest of inflation, average earnings or 2.5%.
There have been warnings over the cost of the lock, and the government says it will review it after 2020.
Shadow Treasury minister Rebecca Long-Bailey said this caused "uncertainty and worry", pledging to protect it "throughout the lifetime of the next Parliament", due to end in 2025.
Speaking during Treasury questions in the Commons, Chancellor Philip Hammond said it was responsible for the government to decide which commitments it can afford to keep at a spending review before the end of Parliament.
Attacking Labour's pledge, he added: "I think it tells us everything we need to know about the Opposition - that three-and-a-half years out they're willing to spray around commitments without any idea of what it's going to cost them."
During last week's Autumn Statement Mr Hammond said the triple lock would be maintained until 2020 but suggested it would then be reviewed.
There have been calls for it to be scrapped, including from former pensions minister Baroness Altmann, who said the costs would become "enormous" after 2020, and the previous work and pensions secretary, Stephen Crabb.
Speaking after Treasury Questions, shadow chancellor John McDonnell accused the Conservatives of "abandoning older people" by not guaranteeing to continue the pledge.
He added: "Labour will support the pensions triple lock and instead of cutting taxes for the super-rich and giant corporations will make sure our NHS and social care is properly funded."
Labour says it will keep the "triple lock" protecting the state pension throughout the next Parliament.