How to decode a base64 string in C#?


Grammarly

More than 40 Lakhs Students and Professionals use Grammarly for their spell and grammar checks. You can register and try for free.

Here’s a sample code snippet demonstrating how you can easily decode a base64 encoded string in C#.

How to decode a base64 string in C#?

var base64EncodedString;//Fill this with your data.
byte[] byteArray = Convert.FromBase64String(base64EncodedString);
string output = Encoding.UTF8.GetString(byteArray);

Grammarly

More than 40 Lakhs Students and Professionals use Grammarly for their spell and grammar checks. You can register and try for free.
%d bloggers like this: