A man will face court after two other men were stabbed at a western Sydney railway station yesterday.

At about 1.45pm, police were called to Merrylands station, where they found a 21-year-old man and a 23-year-old man who had both been stabbed.

Police were told the 21-year-old had been stabbed in the chest and arm after a verbal altercation in a train carriage, before the alleged attacker left the carriage and stabbed the 23-year-old in the arm on the platform.

Two men were stabbed at Merrylands railway station. (Kate Geraghty)

The two victims were taken to hospital, both in a stable condition.

At about 3pm yesterday, police arrested a 34-year-old man at a home on Woodville Road, Guildford.

He was charged with reckless wounding and aggravated assault with intent to rob.

He was refused bail and will appear in court today.