A heavily pregnant woman was brutally attacked by a man in a Sydney cafe.

Rana Elasmar, aged 31, who is 38 weeks pregnant, was sitting in a cafe when Stipe Lozina, 43, allegedly leaned over the table she was sharing with friends and launched a sustained and brutal attack.

CCTV shows the woman and her friends, all of whom wear hijabs being approached by the man and after a brief conversation he launches at the woman. It is alleged the accused made a racist comment to the woman before the attack.

Police said the accused is not known to the woman, but he is known to police. He has been charged with affray and assault occasioning actual bodily harm.

He was refused bail and will remain behind bars until at least next month.

Mrs Elasmar was admitted to hospital and both mother are said to be recovering.