A 12-year-old boy has been charged over the stabbing of a man in what police say was a random attack in Brisbane's south.

The boy has been accused of stabbing a 24-year-old man in the back while he was talking on a phone outside a takeaway restaurant in Acacia Ridge about 8:30pm on Saturday.

The man was transported to the Princess Alexandra Hospital to receive treatment for non-life threatening injuries.

Police said the man was unknown to the boy.

The boy, from Pallara, ran away after the alleged attack but was found a short time later nearby and charged with one count of wounding.