Whether you’re selling off your smart phone or sending it for repairs, it is recommended that you back up your files and wipe your data clean before passing your device to someone else. You won’t want your private photos or logged-on social accounts fall into the wrong hands. The best way to do this is by performing a hard reset which can be different from one device to another.
To find out how to hard reset any device, you can check out HardReset.info which offers step by step instructions that are easy to follow. At the moment they have a large database of over 6,700 devices from old feature phones to the newer smart phones. At time of writing, the latest Galaxy S5, HTC One M8 and Xperia Z2 are not listed yet but the hard reset steps should be similar with their previous models.
If you need to reset a device, just head over to hardreset.info.