Take a look here at Stack Overflow itself that there are already several questions about it. Briefly, the MD5 cannot be reversed but, since the calculation of the MD5 of a string will always result in the same hash, it is easy to find the open text in a list of MD5 hashes. There are several better alternatives - the one I recommend is to have a password salt and encrypt the password with this salt and a more secure algorithm, for example Bcrypt.
What is the purpose? A hash can be used for several things, and for some of them MD5 is reasonably safe yes (although it is usually combined with other cryptographic primitives). MD5 is vulnerable to collisions (cannot be used in digital signature protocols), but remains resistant to pre-image and 2nd pre-image (i.e. can only be "reversed" in an exhaustive search). It is also quite fast, which makes it useless to protect passwords (or other short texts).
Take a look here at Stack Overflow itself that there are already several questions about it. Briefly, the MD5 cannot be reversed but, since the calculation of the MD5 of a string will always result in the same hash, it is easy to find the open text in a list of MD5 hashes. There are several better alternatives - the one I recommend is to have a password salt and encrypt the password with this salt and a more secure algorithm, for example Bcrypt.
– Rodrigo Rigotti
What is the purpose? A hash can be used for several things, and for some of them MD5 is reasonably safe yes (although it is usually combined with other cryptographic primitives). MD5 is vulnerable to collisions (cannot be used in digital signature protocols), but remains resistant to pre-image and 2nd pre-image (i.e. can only be "reversed" in an exhaustive search). It is also quite fast, which makes it useless to protect passwords (or other short texts).
– mgibsonbr