The Main difference between encoding and encryption are the Key
Both are used for manipulating string
Encoding : Is the way to manipulating without any key. Means the character or number is replaced by one another using some method
Encryption : Is also a way to change Data with Key. Means to encrypt string you need to have key to encrypt and the same way using that key you can decrypt the encrypted string or data.