A man whose online deception about his appearance allowed him into a woman's bed has been spared jail but had his actions criticised by a judge as "selfish, immature and inappropriate".

Deepak Dhankar, of Indian descent, deceived the woman into believing he was a muscular, blond-haired Caucasian named "Jamie" during exchanges on dating website Oasis in October last year.

Deepak Dhankar leaves the Melbourne County Court with his wife and lawyer. Credit:Jason South

Three days after the pair first communicated, they agreed for Dhankar to visit the woman at her home and engage in sexual activity, on the condition she kept her eyes closed. He arrived at her home to find her naked in bed.

Judge Jane Patrick told the County Court the deception occurred when the pair engaged in sexual acts, because the woman believed she was with "Jamie" at the time, and not Dhankar.