How to unlock your iPhone before selling itBe a good sport and unlock your iPhone before selling it.
Most smartphones become locked to a specific carrier once a SIM card has been installed. Once the SIM is removed, only SIMs from that specific carrier will work in that iPhone.
If you're selling an iPhone, you can increase the value if it's unlocked. That way, the buyer doesn't have to pay to have it unlocked or go through the trouble of figuring it out themself. It's just good business. Also, the phone should then work on most GSM mobile networks (so long as it's compatible with that network's radio bands).
How to unlock your iPhone
How to unlock any smartphone is specific to the carrier. You'll have to go through your carrier and request an unlock code (in most cases) and won't be able to do it yourself.
Keep in mind that you must still be a customer of the carrier to which the phone is locked; otherwise, you're out of luck. There will also be some requirements that must be met before your carrier unlocks your iPhone. Y...
Source:
How to unlock your iPhone before selling it