Some people rip off the corner of the packet with their teeth. Others, while driving, squirt the ketchup directly into their mouth, then add fries. Some forgo fries at the drive-through all together to keep from creating a mess in the car.

After observing these and other "compensating behaviors," H. J. Heinz Co. says it spent three years developing a better ketchup packet.

Heinz says the new "Dip and Squeeze" packets will begin replacing the traditional rectangular ketchup packets later this year at Wendy's Co. WEN -0.25% restaurants. Smaller chains including Chick-fil-A Inc., Smashburger Master LLC, and International Dairy Queen Inc. started carrying the packets earlier this year.

McDonald's Corp. MCD 0.37% and Burger King Holdings Inc. are testing the packets but declined to comment on the results.

As the name promises, "Dip and Squeeze" ketchup can be squeezed out through one end or the lid can be peeled back for dipping. The red, bottle-shaped packets hold three times the ketchup as traditional packets. The new containers are more expensive than the old sleeves, but Heinz hopes customers learn not to grab more than one or two.

To develop the new packet, Heinz staffers sat behind one-way, mirrored glass, watching consumers in 20 fake minivan interiors putting ketchup on fries, burgers, and chicken nuggets.

To try new prototypes himself, Mike Okoroafor, Heinz vice president of global packaging innovation and execution, bought a used minivan, taking it to local McDonald's and Wendy's drive-throughs to order fries and apply ketchup in the confined space.

The ketchup packet has been around for more than 40 years but many people struggle to open it or skip it to avoid the mess. To solve this, Heinz spent three years designing a better ketchup packet. Sarah Nassauer has details on Lunch Break.

The newly designed Heinz ketchup packet. Martin F. Ramin/The Wall Street Journal

"I wasn't going to use my car—too messy," he says.

Heinz for decades has searched for better single-serve packets. The company has tried making them bigger, easier to open, or attachable to a cup of French fries. None of the changes could be made cheaply or solve customers' main complaints—the single-serve packets are messy, hard to open and don't provide enough ketchup—say executives. For about the past decade, Heinz sold two single-serve containers: the classic squeeze packet and a dipping cup.

Heinz believes traditional ketchup packets are so annoying that they stop people from ordering fries at drive-thrus. "Fry inclusion orders" at drive-thrus "have been going down for years," says John Bennett, vice president of food-service ketchup, condiments and sauces for Heinz.

A large, wedge-shaped packet almost made it onto the market but Heinz ditched the design months before its planned introduction in 2008. Mr. Okoroafor declines to say what Heinz spent developing the "Dip and Squeeze."

In 2006, when activist investor Nelson Peltz battled Heinz for board seats, he pushed the company to make a number of changes, large and small, including developing easier-to-open ketchup packets. Now, Mr. Peltz sits on the boards of Heinz and Wendy's, which his holding company, Triarc Cos., bought in 2008.

Mr. Peltz declines through a spokesman to comment on the packaging change, saying it wouldn't be appropriate since he's on the boards of both companies.

The newly designed Heinz ketchup packet, left, and the old. Martin F. Ramin/The Wall Street Journal

Since a supply spat between Heinz and McDonald's that arose during a 1973 tomato shortage, Heinz, the country's largest ketchup producer, has been locked out of most McDonald's U.S. locations. Though Heinz didn't design the new packet to get back in McDonald's good graces, "that would be a wonderful side benefit," says Heinz's Mr. Bennett. The only McDonald's serving Heinz now are in Minneapolis and Heinz's hometown of Pittsburgh, he says.

The new packets cost Heinz several times more to produce than the old rectangular pouches it has been selling for over 40 years. The new containers cost restaurants more than three times the old packets, as well, which could give pause to some chains.

Restaurants give ketchup away, so "cost is king," says Amy Coltrin, senior director of product development for Golden State Foods Corp., a Heinz competitor that supplies private-label ketchup to most McDonald's in the U.S.

Stuart Leslie, president of 4sight Inc., a package-design firm based in New York that worked with Heinz, says the package subtly cues the consumer about the portion. Shaped like a bottle of Heinz ketchup and larger than the traditional packets, the "Dip and Squeeze" packs signal, "This is a serving, this is a bottle of ketchup," Mr. Leslie says. "You actually don't need 16 bags of ketchup."

Early tests at Chick-fil-A show the potential cost problems: consumers took more ketchup with the new packets, according to Chick-fil-A surveys of about 50 restaurants over several months. But the survey also indicated that customers strongly preferred the new packets.

Some consumers appeared to be hoarding the new packets, says Brian Wray, manager of brand strategy and design at the Atlanta-based fast-food chain. He expects use will plateau as the novelty wears off and people learn how much they need.

Other restaurants, including Smashburger and Dairy Queen, that conducted similar tests say people are using about the same or less ketchup.

On a recent afternoon inside a Chick-fil-A in Atlanta, Bruce Stanford is skeptical. The 55-year-old worries he might rip off the cover and douse himself with ketchup before digging into his chicken sandwich, fries and iced tea.

But after using it, the hospital admissions employee from Marietta, Ga., stays clean. "I get the concept," he says. "You squeeze on the sandwich and dip for fries."

—Timothy W. Martin

and Julie Jargon

contributed to this article.

Write to Sarah Nassauer at sarah.nassauer@wsj.com