The Samsung Galaxy S4 and the S3 are two great devices and even though newer handsets have come out many owners have stuck with the handsets. If you are the owner of either of these devices and you purchased it locked, you can unlock it thanks to an unlock code that has leaked online.
The leaked unlock code is said to work with the Samsung Galaxy S4 and S3 and once you have unlocked your handset you can then take it to another carrier of your choice.
To start with put a new SIM card into the device and then turn it off and back on. Open the dial pad up of the phone and then enter *#197328640#. You can then follow the steps carefully below.
 UMTS >  Debug Screen >  Phone Control >  Network Lock > Options  Perso SHA256 OFF.
You should now wait for around 30 seconds and then you can go to the main menu and here you will see Network Lock. You should choose  NW Lock NV Data INITIALLIZ, and if all has gone to plan you should now be left holding an unlocked device.
The leaked unlock code is said to work with the Samsung Galaxy S4, Samsung Galaxy S3 and other handsets from Samsung.