AltraTools
🍪

HTTP Cookie Generator

Generate Set-Cookie headers with all security attributes

Presets:

Cookie Details

Expiration

Security Attributes

Generated Header

Note: HttpOnly cookies cannot be set via JavaScript

Set-Cookie Header Generator

Create properly formatted Set-Cookie HTTP headers with all security attributes including Secure, HttpOnly, SameSite, and the new Partitioned attribute.

Cookie Attributes Explained

  • Secure: Cookie only sent over HTTPS
  • HttpOnly: Not accessible via JavaScript (XSS protection)
  • SameSite: Controls cross-site request behavior (CSRF protection)
  • Partitioned: CHIPS - Cookies Having Independent Partitioned State
  • Max-Age: Cookie lifetime in seconds
  • Expires: Absolute expiration date

Security Best Practices

For session cookies: use Secure + HttpOnly + SameSite=Strict. For third-party cookies in a privacy-preserving way, use Partitioned with SameSite=None.