Attack Surface Area Calculator
Calculate your application attack surface from endpoints, weighting by exposure type. Public (3x), authenticated (2x), internal (1x) scoring.
Calculate token expiration time from issue timestamp and TTL. See remaining seconds, minutes, and hours until your auth token expires.
| Preset Type | TTL | Expires At (from now) | Status |
|---|---|---|---|
| 15 min (OAuth) | 15.0 minutes | 14.0 minutes | Valid |
| 1 hour (Standard) | 1.0 hours | 59.0 minutes | Valid |
| 24 hours (Session) | 1.0 days | 24.0 hours | Valid |
| 7 days (Long-lived) | 7.0 days | 7.0 days | Valid |
| 30 days (Offline) | 1.0 months | 30.0 days | Valid |
Authentication tokens (OAuth, API keys, session tokens) have a limited lifetime defined by their Time-to-Live (TTL). Once the TTL expires, the token becomes invalid and the client must re-authenticate. Understanding when tokens expire is essential for building reliable API integrations, debugging authentication failures, and configuring token refresh logic.
This calculator computes the exact expiration timestamp from an issued-at time and TTL value, and shows the remaining duration in human-readable format. It supports seconds, minutes, hours, and days for TTL input and converts between Unix timestamps and ISO dates. Use it to debug token timing issues, verify server configurations, or plan token refresh strategies.
Token expiry issues are a common source of API failures that can be difficult to debug without precise timing information. It gives clear visibility into token validity, helping developers build proper refresh logic and operations teams diagnose authentication failures in production.
Expiry = Issued_At + TTL (in seconds). Remaining = Expiry โ Now. Status: Expired (remaining โค 0), Expiring Soon (remaining โค TTL ร 10%), Valid (remaining > 0).Result: Expires: 2026-02-08T11:00:00Z | 42 min remaining
A token issued at 10:00 AM UTC with a 3,600-second (1-hour) TTL will expire at 11:00 AM UTC. If the current time is 10:18 AM UTC, there are 42 minutes remaining. The token should be refreshed before expiry to maintain uninterrupted access.
Tokens follow a predictable lifecycle: issuance, use, refresh, and expiration. Understanding this lifecycle is fundamental to building robust authentication systems that handle edge cases gracefully.
Access tokens: 15โ60 minutes. Refresh tokens: 7โ30 days. API keys: 90โ365 days with rotation. Session tokens: 30 minutes of inactivity. Each type has different security and usability trade-offs.
Proactive refresh: Refresh at 75% of TTL to avoid interruption. Reactive refresh: Refresh on 401 response. Hybrid: Proactive with reactive fallback. The hybrid approach provides the best balance of reliability and simplicity.
Common causes of token failures: expired TTL, clock skew, revoked token, incorrect audience/scope, and token for wrong environment. Decode JWT tokens (jwt.io) to inspect timestamps, claims, and signatures for debugging.
Last updated:
Access tokens typically have TTLs of 15 minutes to 1 hour. Shorter TTLs reduce the window of exposure if a token is compromised, while longer TTLs reduce the frequency of re-authentication and improve user experience.
The server rejects requests with the expired token, typically returning a 401 Unauthorized status code. The client must obtain a new token, either through re-authentication or by using a refresh token if available.
Clock skew is the difference in time between client and server clocks. If clocks are out of sync, a token that appears valid to the client may already be expired on the server. A small buffer (5โ30 seconds) before the actual expiry helps prevent this.
Short TTLs (5โ15 min) are more secure because they limit the damage window of a stolen token. Long TTLs (hours to days) are more user-friendly. The right choice depends on your threat model, sensitivity of the data, and availability of refresh tokens.
Access tokens are short-lived (minutes to hours) and sent with every API request. Refresh tokens are long-lived (days to months) and used only to obtain new access tokens. This separation limits exposure while maintaining session continuity.
Generally no โ tokens are cryptographically signed with a fixed expiry. Instead, issue a new token with a new TTL. Some systems implement "sliding" expiry where activity extends the session, but this is handled at the session level, not by modifying the token itself.
Calculate your application attack surface from endpoints, weighting by exposure type. Public (3x), authenticated (2x), internal (1x) scoring.
Calculate brute-force attack time for any keyspace. Compare online, offline, and GPU attack speeds to assess password and key security.
Calculate bug bounty program ROI from bounty payouts, management costs, and estimated breach prevention value. Justify your bounty budget.