Base64 encoded string to file

JL. picture JL. · Oct 19, 2009 · Viewed 76.6k times · Source

I have a base64 encoded string.

How can I write this base64 encoded string to a file?

Answer

Rubens Farias picture Rubens Farias · Oct 19, 2009

Try this:

File.WriteAllBytes(@"c:\yourfile", Convert.FromBase64String(yourBase64String));