Starbucks is announcing a new policy that allows anyone to sit in its cafes or use its restrooms, even if they don't buy anything.

The new policy comes five weeks after two black men who hadn't bought anything were arrested at a Philadelphia Starbucks.

Company executives have said its previous policies were loose and ambiguous, leaving decisions on whether people could sit in its stores or use the bathroom up to store managers.

Starbucks said on Saturday it has told workers to consider anyone who walks into its stores a customer, "regardless of whether they make a purchase."

READ MORE:

* Starbucks just the latest US retailer accused of racial profiling

* Starbucks gives workers a pay rise, thanks to Trump's tax cuts

* Starbucks says sorry after arrest of 2 black men hits a nerve

* Will Starbucks man Howard Schultz run for president?

The company said anyone can use its cafes, patios or restrooms without buying anything, but it noted workers should still call the police if someone is a safety threat.

OLI SCARFF/GETTY You don't need to buy anything to hangout in a Starbucks, the company says.

"We are committed to creating a culture of warmth and belonging where everyone is welcome," Starbucks said in a statement.

The two men who were arrested April 12 in Philadelphia were awaiting a third person for a meeting. One of them was denied use of a restroom because he hadn't bought anything. A worker called police, and the men, Rashon Nelson and Donte Robinson, were arrested. They spent hours in jail before they were released.

The incident, video of which was posted on social media, was a major embarrassment for the coffee chain. Starbucks has long projected itself as a socially conscious company and promoted its stores as a neighbourhood gathering place.

In response to the arrests, Starbucks plans to close more than 8,000 of its US stores on the afternoon of May 29 for racial-bias training for its employees.

The men who were arrested settled with Starbucks earlier this month for an undisclosed sum and an offer of a free college education. They also reached a deal with Philadelphia for a symbolic $1 each and a promise from city officials to set up a $200,000 ($289 000 NZD) programme for young entrepreneurs.