Note: Make sure you backup your data and application before using steps below, as hard reset will result completely wipe your data and applications.Also make sure you have your phone battery fully charged.
There are multiple ways to hard reset your Galaxy S4.
- Using factory reset option
Go to System -> Account -> Backup and Reset -> Factory data reset -> Reset Device -> Erase everything on your mobile.
- Using Galaxy S4 recovery mode
Enter to recovery mode using steps mentioned in the post How to enter to recovery mode.
Once you are on recovery screen select Wipe data /Factory reset with volume down and power button. The select Yes--delete all user data.
Once format is complete reboot your device using reboot now option.
- Using Factory Reset code