Hashing vs. encoding — they are not the same
A hash (MD5, SHA-256) is one-way: you can compute it from data, but you cannot get the data back. It is for checksums, integrity and password storage. Encoding (Base64, URL, hex) is two-way: it just represents the same bytes in a transport-safe form, so it always decodes. Encoding is not encryption and provides no secrecy.
Which hash should I use?
Use SHA-256 for integrity and general-purpose hashing. Avoid MD5 and SHA-1 for anything security-sensitive — they are broken against collisions — but they are still everywhere in legacy checksums, which is why they are here. For passwords, use a slow, salted hash like bcrypt or Argon2, never a raw hash.