This guide assumes that you have rooted your Galaxy S III, have ClockworkMod Recovery flashed and that you have taken a NANdroid backup.
Step 1: Download Android 4.1.1 Jelly Bean (Leaked Build: I9300XXDLG4) and ODIN v1.85. Head over to xda-developers to download.
Step 2: Extract the contents of both zip files using a suitable software. We recommend 7-zip.
Step 3: Shut down your Galaxy S III. Press and hold Home + Power + Volume Down buttons to go into Download Mode.
Step 4: Launch ODIN on your PC from the .zip you extracted in Step 2.
Step 5: Connect your Galaxy S III with your PC using a USB cable. ODIN will show a message saying it has recognized your device.
Step 6: From ODIN, click on PDA and choose CODE_I9300XXDLG4_11164_REV00_eng_mid_noship.tar.md5 which will be inside the Jelly Bean ROM you extracted in Step 2.
Step 7: Ensure that you have unchecked re-partition. Click Start.
Step 8: As noted by a recognized developer on XDA, your device will probably now go into a boot loop . Remove your device’s battery and insert it again.
Step 9: Boot into ClockworkMod Recovery by pressing and holding Home + Power + Volume Up.
Step 10: Select wipe / factory reset.
Step 11: Select reboot system now.