Calculate cookie expiration from a session length or an exact date. Get the Expires header, Max-Age seconds and a ready Set-Cookie directive. All processing runs locally in your browser. Your data is not uploaded to any server.
100% Local Processing
How to Use
Turn a session lifetime or an expiry date into the exact Expires and Max-Age values for a Set-Cookie header, calculated against the current moment.
Steps
Enter a session length in days, hours or minutes.
Or set an exact expiry date instead.
Click Calculate and copy the Max-Age and Expires values for your Set-Cookie header.
What the result shows
The Expires date in the HTTP header format.
The Expires date in your local timezone.
Max-Age in seconds, the value modern browsers prefer.
A complete Set-Cookie directive line ready to paste.
Features
Sampling the current moment makes the header always fresh.