A man has been brutally bashed with a baseball bat and chased into a Melbourne shopping centre, where he was attacked again, police say.

The 42-year-old man had been crossing the Westfield Plenty Valley car park in the city's north when another man approached and began hitting him with the bat, said Leading Senior Constable Lee Thomson.

A man has been charged over a baseball bat attack in Melbourne.

The man fled into the Mill Park mall, but he was followed by the attacker, who then assaulted him again in front of shocked shoppers, she said.

The man suffered non-life threatening injuries while the attacker fled, only to be arrested a short time later.

Police believe the pair did not know each other and are investigating the Saturday afternoon incident as a random attack.

A 31-year-old man, from Mernda, has been charged with assault and other offences. He was remanded to appear in the Melbourne Magistrates' Court on Sunday.

Anyone with information is asked to contact Crime Stoppers on 1800 333 000 or www.crimestoppersvic.com.au.