New Livestream: OWASP Top 10 2025 Explained for .NET Developers.
Convert epoch and Unix timestamps to human-readable dates and back, including the exp, nbf and iat claims in a JWT.
Detected:
| Format | Value | Actions |
|---|---|---|
| UTC | ||
| Local | ||
| ISO 8601 | ||
| RFC 2822 | ||
| Day | ||
| Relative | ||
| .NET |
DateTimeOffset.UtcNow.ToUnixTimeSeconds() | Input | UTC | Relative |
|---|---|---|
| Claim | Value | Actions |
|---|---|---|
Unix time (epoch time) counts seconds since 00:00:00 UTC on January 1, 1970, the "Unix epoch," ignoring leap seconds. It's timezone-free by design: the same number means the same instant everywhere, which is why it's the default way APIs, databases and token formats like JWT exchange points in time.
Most systems use whole seconds (a 10-digit number today), but
JavaScript's Date.now() and many
logging/tracing systems use milliseconds (13 digits), and some
high-resolution systems use microseconds or nanoseconds. This tool
detects the unit from the number of digits and lets you override it if
the auto-detection guesses wrong.
Systems that store Unix time in a signed 32-bit integer will overflow
at 03:14:07 UTC on January 19, 2038, wrapping around to a date in 1901.
Modern 64-bit systems (including .NET's
DateTimeOffset and JavaScript's
number) aren't affected, but it
still matters for older databases, file formats and embedded systems.
JWTs encode expiration (exp),
not-before (nbf), issued-at
(iat) and, for ID tokens,
authentication time (auth_time)
as Unix timestamps in seconds. See
the JWT decoder for a
full breakdown of a token's claims, or paste just the time claims into
the helper above. Learn more in
managing token expiration, refresh & revocation in web APIs.
Because server clocks are never perfectly synchronized, token
validation libraries tolerate a small amount of clock skew when
checking exp and
nbf. Both IdentityServer and
ASP.NET Core's JWT Bearer handler default
ClockSkew to 5 minutes. See
token handling in IdentityServer for how to tune it.
.NET's DateTimeOffset has
built-in Unix time conversions, which avoid manual math and timezone
bugs:
Csharp
// Unix seconds -> DateTimeOffset
var when = DateTimeOffset.FromUnixTimeSeconds(1700000000L);
// DateTimeOffset -> Unix seconds
long epoch = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
// Milliseconds variants also exist:
DateTimeOffset.FromUnixTimeMilliseconds(1700000000000L);
DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();Decode, inspect and verify JWTs with claim explanations, expiry checks and signature verification.
Fetch and inspect a JWKS from an issuer or URL to see every signing key and its properties.
Fetch and explore an OpenID Connect discovery document and its endpoints.
The OpenID Connect and OAuth 2.0 framework for ASP.NET Core, from the team that built this tool.