There might be more than one reason why people would want to unlock their smartphone but to do so, you will need to get the unlock code from the carrier. Luckily, the unlock code for the Samsung Galaxy S4 was leaked so unlocking it is no longer an issue now. Here is how you can unlock the device on your own.
Start by putting in a new SIM card. Next, restart the Samsung Galaxy S4 and open up the dial pad. Enter the code, *#197328640 and select [1]UMTS > [1] Debug Screen > [8] Phone Control > [6] Network Lock > Options [3] Perso SHA256 OFF.
Wait for at least 30 seconds before pressing Back to enter Main Menu once more. Now select [4] NW Lock NV Data INITIALLIZ. Your Samsung Galaxy S4 should be unlocked now. It is also said that the code also works on some of the older models like the Samsung Galaxy S3.