June 18 (Reuters) - Walmart, the world's largest retailer, agreed to pay $1.64 million to settle regulatory charges that its 64 New Jersey stores employed illegal pricing practices that made it hard for consumers to comparison-shop.

Matthew Platkin, New Jersey's attorney general, said on Tuesday that the settlement includes a $1.62 million civil fine, and is the largest obtained by the Office of Weights and Measures of the state Division of Consumer Affairs.

New Jersey is one of nine U.S. states that requires grocery retailers to display prices using standard, easy-to-understand measurements such as pounds and quarts.

Platkin said Walmart store inspections in the first quarter of 2023 found more than 2,000 incorrect measurements, sometimes in the same category: coffee, for example, could be priced by the pound, the can or the number of pods.

"As the price of grocery items continues to rise," Platkin said, "this settlement sends a clear message that New Jersey will not allow retailers to engage in unlawful pricing practices that deny shoppers the ability to easily compare prices to figure out which product is a better buy."

Walmart did not immediately respond to requests for comment.

The Bentonville, Arkansas-based retailer did not admit wrongdoing, but in a consent order said it "takes seriously its obligations to provide accurate unit prices to enable customers to comparison shop."

Walmart also agreed to improve employee training and randomly screen items to ensure it displays proper measurements.

In November, discount retailer Dollar General agreed to pay $1.2 million, including a $1.18 million fine, to settle New Jersey charges that it scanned higher prices at checkout than it posted on merchandise displays thousands of times.

That settlement had been the largest obtained by the state's weights and measures office. (Reporting by Jonathan Stempel in New York; Editing by Mark Potter)