If you aren't making payments to T-Mobile for the phone and the phone has been used for 40 days on a T-Mobile plan and you haven't exceeded the unlocks-per-year allowed, T-Mobile will unlock it for you for free. Just give them a call or go to their web site for instructions. I haven't done one recently but in the past it can take up to 3 days to get the unlock code emailed to you. Also, the procedure they will provide requires a non-T-Mobile SIM to be in the phone when you unlock it. But if you don't have one, you can probably do a web search to find an alternate procedure for that model that doesn't require a SIM to be in the phone.