Target Corp. TGT -1.99% is testing a new distribution strategy aimed at speeding up its restocking and making the retailer more nimble at stores and online as it competes with rivals like Amazon.com Inc. and Walmart Inc.

The aim is to pare what Target calls its replenishment cycle from days to hours and reduce inventory at stores, especially at the retailer’s new small-format stores and locations in denser urban areas. The approach, now in pilot mode at a warehouse in Perth Amboy, N.J., also uses the same pool of inventory to replenish stores and fulfill online orders, a departure from Target’s existing supply chain.

Under the operation Target is testing at the New Jersey facility, called a “flow center,” the company sends shipments to stores more frequently and in smaller lots tailored more precisely to demand rather than shipping big cases of products, Preston Mosier, Target’s senior vice president of global supply chain and logistics field operations, said Thursday at an industry conference in New York.

That could mean shipping “five bottles of shampoo, a case of ketchup, two polo shirts on hangers and a pallet of water, all prepared to move out directly to the sales floor,” Mr. Mosier said. “Or it could mean sending similar items prepared to move directly to a pack station to later go out to a guest in the neighborhood.”

Also in Logistics XPO Logistics Adjusts Guidance Off Customer Bankruptcy

The retailer is also creating a new warehouse management system intended to better integrate its distribution and fulfillment operations, which now use separate systems even when they share the same building, Mr. Mosier said.

The logistics effort comes as Target is investing $7 billion in store and digital improvements as it adjusts to the changing consumer shopping patterns that have buffeted the retail world. The explosive growth of e-commerce has put a premium on rapid delivery to online buyers and pressured traditional retailers to make better use of their real estate, an especially big share of overhead at “big-box” operators of brick-and-mortar stores.

Related Video The retail industry is undergoing another major shift -- to e-commerce. How did we get here? Photo: Associated Press

Target has been expanding its use of stores to fulfill online orders, and nearly 70% of its online volume was handled by stores during the 2017 holiday season. Last year, the retailer bought the grocery delivery startup Shipt for $550 million to build up its same-day delivery capability.

With less inventory held at stores, “we can dedicate more room to digital fulfillment,” Chief Operating Officer John Mulligan said in a conference call with investors in March on Target’s quarterly earnings. “Shipping more orders from our stores reduces our costs, while allowing us to move faster,” he said.

“ Shipping more orders from our stores reduces our costs, while allowing us to move faster. ” — Target COO John Mulligan

Such logistics overhauls can be highly complicated, however, and glitches like shipping delays or out-of-stock items can alienate consumers accustomed to Amazon-type levels of service and product arrays.

“As traditional retailers move into a more omnichannel world, the risk margin is smaller,” said Ben Yokell, vice president of integrated demand and supply planning at consulting firm Chainalytics.

The U.S. retail pharmacy division of drugstore giant Walgreens Boots Alliance Inc. WBA -1.85% also uses an integrated supply chain to serve both e-commerce customers and retail stores, where shipments of big caseloads of products remain the exception.

“We have small stores, with a lot of slow-moving” items,” Dov Shenkman, the company’s group vice president of supply chain operations, inventory and transportation said Friday at the same conference. “We cannot survive if we replenish the store with cases, because…there is no space.”

At Target, stores supported by the flow center have reduced back-room inventories “to a fraction of the norm,” Mr. Mosier said. Out-of-stocks are also down, increasing sales.

Write to Jennifer Smith at jennifer.smith@wsj.com