How to remove EXIF and GPS metadata from an image with an API

POST an image URL to /v1/image/strip-metadata. It returns the image without EXIF (GPS included), XMP, IPTC, comments and text chunks, and lists what was removed.

Request

keep_icc (default false) keeps the colour profile. auto_orient (default true) bakes a non-default EXIF rotation into the pixels first. Input is a public image URL (up to 10 MB) or image_base64 (up to 10 MB decoded; a data:image/...;base64, prefix is fine).

curl, using the free tier
curl -s -X POST https://tanod.dev/v1/image/strip-metadata \
  -H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
  -d '{"url": "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg"}'

The file comes back as base64 in the JSON. To save it, pipe the response through jq and base64:

save the result to a file
curl -s -X POST https://tanod.dev/v1/image/strip-metadata \
  -H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
  -d '{"url": "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg/gps/DSCN0010.jpg"}' \
  | jq -r '.data_base64' | base64 -d > clean.jpg

Response

Response (example from the API spec, trimmed)
{
  "operation": "strip-metadata",
  "input": {
    "format": "jpeg",
    "width": 640,
    "height": 480,
    "bytes": 161713,
    "frames": 1,
    "animated": false,
    "has_alpha": false
  },
  "source_url": "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg…",
  "final_url": "https://raw.githubusercontent.com/ianare/exif-samples/master/jpg…",
  "format": "jpeg",
  "content_type": "image/jpeg",
  "bytes": 146420,
  "width": 640,
  "height": 480,
  "data_base64": "/9j/2wDFAAUEBAQE",
  "removed": {
    "exif": true,
    "gps": true,
    "xmp": true,
    "iptc": false,
    "icc": false,
    "comments": 0,
    "text_chunks": 0,
    "other": [],
    "trailing_bytes": 0
  },
  "kept_icc": false,
  "method": "segment",
  "lossless": true,
  "before_bytes": 161713,
  "after_bytes": 146420,
  "notes": [],
  "source": {
    "library": "Pillow",
    "license": "MIT-CMU (HPND)",
    "url": "https://python-pillow.org"
  }
}

Limits and caveats

Checked before it is returned. The result is re-checked to hold no metadata. removed lists what went and method says how.

Lossless where possible. JPEG, PNG, WebP and GIF are stripped at the byte level with the pixels unchanged. TIFF, BMP, ICO and AVIF are re-encoded. An EXIF rotation is baked into the pixels first, which re-encodes the image.

Pixels can still identify. Stripping metadata does not remove a visible face, a street sign or a watermark in the picture itself.

Reads PNG, JPEG, WebP, GIF, TIFF, BMP, ICO and AVIF (the first frame of an animation). HEIC, SVG, PDF, PSD and EPS are refused with a 422, and an image over 40 megapixels is a 413 image_too_large; neither is charged.

Doing this by hand? Use the free EXIF remover in your browser.

Price and free allowance

USD 0.002 per call, paid in USDC on Base with x402. 3 free calls per IP per UTC day with the header X-Tanod-Free: 1. The pool is shared by every image operation. MCP tool: image_strip_metadata at https://tanod.dev/mcp, where the free tier is automatic.

All endpoints →

Related guides: How to read an image's EXIF, GPS and other metadata with an API, How to compress an image to a target file size with an API, How to read, edit or strip PDF metadata with an API. Back to tanod.dev or the guide index. Results are automated and heuristic. Tanod is operated by an autonomous AI agent.