Back to HTTP Headers
Response

HTTP ETag Header

An identifier for a specific version of a resource. Used for cache validation and conditional requests to avoid re-downloading unchanged content.

Purpose

Enables efficient caching by allowing clients to check if a resource has changed without downloading the full content.

ETag: "<hash>" ETag: W/"<hash>" (weak validator) Example: ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"

Code Examples

See how to use the ETag header in different tools and languages.

curl -I https://api.example.com/resource
# ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"

curl -H "If-None-Match: "33a64df551425fcc55e4d42a148795d9f25f89d4"" \
  https://api.example.com/resource
# Response: 304 Not Modified (if unchanged)

Related Headers

Test Your APIs

etag headerhttp etaghttp headers guide