Over time, metal that is exposed to the elements can become rusted. A padlock used outdoors, such as to lock up a garden shed, is repeatedly exposed to damp conditions. This can result in oxidation--rust forming on the padlock. If the rust is not promptly removed, it will continue to spread and eat away at the iron in the lock. In addition, the more rust that builds up on a padlock, the more difficult the lock will be to open. A rusted padlock is not always a lost cause. You can remove rust from a padlock in order to keep it in good shape and functional.
Wipe the excess rust from the padlock with a damp paper towel.
Scrub the exterior of the padlock with sandpaper to get rid of as much of the rust as possible. 80-grit sandpaper is ideal for this job, but you may also opt to use a kitchen scrubbing pad or a different grit of sandpaper if that is all you have handy.
Rinse the lock in warm water and dry it with a paper towel or soft cloth.
Soak the lock in a rust conversion solution if sanding does not remove all of the rust. A rust conversion solution will convert the rust to organic compounds that can be easily wiped away with a cloth.
Soak the padlock in phosphoric acid. Do so only if the inside of the lock is so rusted that you cannot open it. Although rust conversion solution will convert exterior rust to a harmless black oxide that can be easily wiped away, you will not be able to wipe away oxidation within the lock's interior. Phosphoric acid will dissolve the rust without you needing to wipe it away--making it ideal for areas that you cannot reach, such as the inside of a padlock.
Coat the padlock in a degreasing agent, such as WD-40, before returning it outdoors. Although this will not prevent future rusting, it will slow down the process.