Articles → JSON → Can We Store Image In JSON?

Can We Store Image In JSON?








Steps For Storing The Image In JSON




  1. Convert image into base64 string. You can either do it programmatically or use online convertor. For doing this action, I have used https://www.browserling.com/tools/image-to-base64
  2. Picture showing how to convert an image into base64 string using an online tool

    Click to Enlarge

  3. Save base64 string in JSON.
  4. Picture showing the JSON string with image base64 string

    Click to Enlarge

How To Get The Image Back From JSON?




  1. Read the Image attribute from JSON
  2. Use program or online convertor to convert base64 string to image. For this action, I have used https://codebeautify.org/base64-to-image-converter
  3. Picture showing how to convert base64 into image

    Click to Enlarge

Free Online Image To Base64 Tool





Posted By  -  Karan Gupta
 
Posted On  -  Saturday, November 17, 2018

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250