using(var stream = new MemoryStream()) { yourBitmap.Compress(Bitmap.CompressFormat.Png,0, stream); var bytes = stream.ToArray(); var str = Convert.ToBase64String(bytes); }