How to remove EXIF and GPS metadata from an image with an API
Updated 2026-11-10
Use when an image must lose its EXIF, GPS and other embedded metadata before it is shared. Add output=url for a 24 h link.
From an MCP client, add https://tanod.dev/mcp and call image_strip_metadata; its free daily calls are applied automatically, no key or signup.
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 -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:
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.jpgResponse
{
"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
Before it is returned, the result is re-checked to hold no metadata. removed lists what went and method says how.
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.
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.
Add "output": "url" to the request and the file is stored for 24 hours and returned as a link (url, expires_at, sha256) instead of base64, which keeps it out of your context window. The price is the same. How the links work.
Price and free allowance
USD 0.002 per call, paid in USDC on Base, Polygon, Solana, BNB Chain or Arbitrum 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.
Use it from Claude without writing code: in claude.ai or Claude Desktop, add https://tanod.dev/mcp/images?via=strip-image-metadata-api as a custom connector (steps), then ask in plain words, for example "Remove the EXIF and GPS data from this photo before I share it." The free daily allowance is applied automatically over MCP. Beyond it a call needs an x402 payment, which these clients can make.
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.