Activity › Forums › Salesforce® Discussions › How to convert string to blob in Apex? Salesforce® Discussions How to convert string to blob in Apex? Posted by Anjali on October 21, 2020 at 2:27 PM How to convert string to blob in Apex? Shweta replied 5 years, 6 months ago 2 Members · 1 Reply 1 Reply Shweta Member October 21, 2020 at 6:43 PM To convert string to blob : String myString = ‘StringToBlob’; Blob myBlob = Blob.valueof(myString); System.assertEquals(‘StringToBlob’, myBlob.toString()); Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me