It has been clear for some time that Blågult will meet Hungary away, four days earlier.
The two national team matches in June are the last ones before the World Championship qualification begins after the summer.
"We take the next step in June and step up ahead of the autumn's World Championship qualification. We get with Hungary and Algeria good opposition with teams that are ranked higher than the opposition in March (Luxembourg and Northern Ireland)", says national team manager Stefan Pettersson to the association's website.
Algeria is ranked 36th and Hungary 37th in the latest world ranking, where Sweden is 28th.
Sweden begins the World Championship qualification at the beginning of September with away matches against Slovenia and Kosovo. Switzerland also plays in the qualifying group.