One of the attractive things in Sweden for hikers and campers is Allemansrätt - 'Everyman's rights'.
Put simply you can wander where you like and camp where you like. But....
Things aren't that simple.
Yes there's a freedom to roam, even on private property but it's not unrestricted. Two main rules apply - do no damage, and don't disturb people at home. The latter in practice means keeping your distance from buildings, particularly homes, and avoiding people's gardens. Particularly when camping 'out of sight out of mind' is a good maxim to follow.
Do no damage is an important distinction as this includes crops and forests. In England rights of way let you go straight across fields even if the farmer has sown them, but not in Sweden. Around towns and villages keeping a distance from buildings basically means sticking to established paths & finding out of the way spots to camp may not be so easy.
And you should be aware that there are exceptionswhere the normal rules don't apply or are modified. A typical example is in nature reserves & national parks where there may be special rules on camping. City parks are another example.
In Stockholm this means wild camping spots are hard to find in or near the city - presumably for the good reason that there would be too many people doing it. There are probably a lot of places you could stealth camp but you won't be doing it with right on your side. I camped out near Stockholm a few years back in the midst of the woods by lake and only recently discovered that camping's not allowed in that part of the forest. Ho hum.
The other thing to think of when camping out is the rules on lighting fires. Again, many reserves have special rules for this - often that you can only light fires at at official campfire spots. Fair enough, but it is common in the summer particularly that there are fire bans. These can be general over wide areas or specific to certain councils. You need to do some research. Normally camping stores are Ok but even these can be banned sometimes. It's not so long ago that some parts of the fjäIls had a ban on using camping stoves. A bit of a challenge if you haven't planned to go storeless.
And how long can you stay? The law is not very specific. A couple of nights certainly. Some nature reserves specify - typically not more than 2. If you are somewhere really remote I guess no-one will complain. If you are close to civilisation then maybe be happy with one night and be gone before the dog walkers and morning joggers turn up en masse.
With rights come responsibilities. If you are wild camping at the end of the day you are camping on someone else's land. Be sensitive to that and work on a principle of leave no trace. Don't break up the place, damage trees or plants or leave litter. If you carried it in full you can carry it out empty.
Lastly, a tip. In the wilds it's easy to find places where you can be undisturbed. In more civilised areas it can be useful to have a view on what property you are on. Often houses are on a discrete plot of land but theres also often big areas of land that are farms, forestry or just communal. The same rules apply for all of course but it feels better to not be on a plot connected to someone's home - regardless of how big it is. It's also very easy to see how land boundaries lie. Sites like hitta.se have maps where you can choose an overlay of property boundaries. (tomt in Swedish). The combination of this and a good satellite photo makes it much easier to scout ahead for good prospects.
The photo above is taken by a campfire spot in Frölunda nature reserve outside of Kungsängen.

