The boys, said to be around 13, threatened the man with knives and demanded money, which the man refused to give them. The two boys then slashed his thigh and ran away.
The man’s injuries were not serious, police say.
“We are going to try to track down these boys via schools,” said Gert Fredlin of Stockholm police.
The incident is being treated as attempted robbery and serious assault.