The law stipulates that a person has committed rape if they have been part of a sexual act in which the other person has not participated "freely." Rape had previously been defined as a sexual act carried out with the use of violence or threat.
Now for someone to face rape charges, "it is no longer necessary that violence or threats were applied, or that the aggressor took advantage of the victim's particularly vulnerable situation," according to the government.
Courts will need to pay particular attention to whether consent was expressed with words, gestures or in another manner, and judges will have to rule on the issue, according to the law passed in May.
Judge Anna Hannell, who helped create the law, said there was "absolutely no requirement to formally say 'yes', to hit a button in an app or anything else of the same type."
"Simply participating physically isn't a sign of consent," she told Swedish news agency TT.
Rape is punishable by up to six years in prison, with a maximum penalty of 10 years if the victim is a minor.
Backed by the ruling Social Democrat-Green coalition, the law has drawn criticism from several quarters including the Swedish lawyers' association and the national law council.
Opponents say it will force judges to make arbitrary decisions on whether or not there was consent.