C# Convert a Base64 -> byte[]

Sudantha  picture Sudantha · Jul 18, 2011 · Viewed 138.3k times · Source

I have a Base64 byte[] array which is transferred from a stream which i need to convert it to a normal byte[] how to do this ?

Answer

Zruty picture Zruty · Jul 18, 2011

You have to use Convert.FromBase64String to turn a Base64 encoded string into a byte[].