New Livestream: OWASP Top 10 2025 Explained for .NET Developers.

Register Now!
Developer Tools

Epoch & Unix Timestamp Converter

Convert epoch and Unix timestamps to human-readable dates and back, including the exp, nbf and iat claims in a JWT.

Unit

Detected:

Enter a timestamp to see it as a date.
Format Value Actions
UTC
Local
ISO 8601
RFC 2822
Day
Relative
.NET
Convert a date to a timestamp
.NET: DateTimeOffset.UtcNow.ToUnixTimeSeconds()
Convert a list of timestamps
Input UTC Relative
Decode exp / nbf / iat / auth_time from a JWT
Claim Value Actions

What is Unix time?

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.

Seconds vs. milliseconds vs. microseconds vs. nanoseconds

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.

What is the Year 2038 problem?

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.

exp, nbf, iat and auth_time in JWTs

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.

What is clock skew?

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.

Epoch conversion in .NET

.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();
  • JWT Decoder

    Decode, inspect and verify JWTs with claim explanations, expiry checks and signature verification.

  • JWKS Explorer

    Fetch and inspect a JWKS from an issuer or URL to see every signing key and its properties.

  • OIDC Discovery Explorer

    Fetch and explore an OpenID Connect discovery document and its endpoints.

Build on Duende IdentityServer

The OpenID Connect and OAuth 2.0 framework for ASP.NET Core, from the team that built this tool.