Help Center> Content Moderation> FAQ> APIs> How Do I Obtain the Base64 Code of an Image?

How Do I Obtain the Base64 Code of an Image?

The input parameter Image of Content Moderation is a Base64 code of the image. This section describes how to use the Google Chrome browser to obtain the Base64 code of an image.

  1. Open Google Chrome and drag an image file to it. The image is displayed on the browser.
  2. Press F12, click Sources, and select the image file from the navigation pane on the left. The Base64 code of the image is displayed in the right pane.
    Figure 1 Base64-encoded image
  3. Double-click the Base64 code of the image, press Ctrl+A to select all text of the code, and press Ctrl+C to copy it. Do not copy the code by right-clicking it because in that way, some text may be missing.