Go REST

Epoch and Unix timestamp converter

Convert Unix timestamps to and from human-readable dates. The tool auto-detects seconds vs milliseconds, and shows ISO 8601, RFC 2822, relative time, plus seven common time zones. Everything runs in your browser.

Now (seconds)
-
Now (milliseconds)
-
Now (ISO 8601 UTC)
-

Epoch input

Date input

Type or paste any date string; ISO 8601 is preferred.

Result

Enter an epoch or date above.

What is Unix epoch time?

Unix time, also called epoch time or POSIX time, is the number of seconds that have elapsed since 1970-01-01T00:00:00Z (the "Unix epoch"). It is the most common way computers exchange a point in time: a single integer, time-zone-free, easy to compare, easy to subtract.

Higher-precision systems use milliseconds, microseconds, or nanoseconds since the same epoch. JavaScript's Date.now() returns milliseconds; most server-side APIs return seconds. Knowing which one you have is the difference between "right now" and "the year 50,000".

When to use this tool

  • Reading log lines.Server logs often timestamp with epoch seconds because it's the cheapest format to write. Drop one in here to recover the readable date.
  • Inspecting a JWT exp claim.The expiration claim is an integer epoch. Decoded payloads show "exp": 1760000000; this tool tells you that's 2025-10-09 in your local time zone.
  • Picking a deadline for a refresh token.Adding 30 days to "now" is easier with epoch math than with strings. Generate "now" above and add 30 * 24 * 3600.
  • Comparing timestamps across services.If service A reports 1700000000 and service B reports 1700000000000, they're the same moment - one is seconds, the other is milliseconds. The tool's unit badge tells you which is which.

How epoch time works under the hood

Pick a reference moment ("the epoch"), count integer ticks since then. Unix picked 1970-01-01 UTC for historical reasons (the system was new, the date was round). Other epochs exist: NTP uses 1900, Windows FILETIME uses 1601, Apple uses 2001. They're all just offsets.

A 32-bit signed integer can count up to 2,147,483,647 seconds, which is 2038-01-19 03:14:07Z. After that it wraps to a large negative number - the "Year 2038 problem". Linux switched to 64-bit time_t years ago; this matters mostly to embedded systems and old binary file formats.

Worked examples

  • 1516239022is 10 digits, so seconds: 2018-01-18T01:30:22Z. This is the canonical timestamp used in the JWT.io demo token.
  • 1700000000000is 13 digits, so milliseconds: 2023-11-14T22:13:20Z.
  • -1is one second before the epoch: 1969-12-31T23:59:59Z. Negative timestamps are legal in Unix time but rare.
  • 2147483647is the last second a signed 32-bit timestamp can represent: 2038-01-19T03:14:07Z.

Common pitfalls

  • Seconds vs milliseconds.Most cross-language bugs in this area are unit mismatches. If a date looks 1000 years in the future or 50 years in the past, you've got a unit off by 1000.
  • Local time vs UTC.new Date("2024-01-01") in JavaScript is interpreted as UTC, but new Date("2024-01-01 00:00") (with a space) is local. Always send ISO 8601 with an explicit zone to avoid surprises.
  • Daylight saving.Adding "24 hours" to a local time can land you in the wrong day twice a year. Adding 86400 seconds to a Unix timestamp doesn't have that problem - the timestamp is zone-free.
  • The 2038 problem.Still hits embedded devices, old C structs, and some database column types (MySQL TIMESTAMP is 32-bit). For new schemas, use BIGINT for epoch or a native date/time type.
  • Leap seconds.Unix time ignores them, so the same Unix timestamp can name two different real-world instants when one is inserted. Almost never matters; if you're doing GPS or astronomy, look up TAI.

FAQ

What is a Unix timestamp?

A Unix timestamp is the number of seconds (or milliseconds) since 1970-01-01T00:00:00Z. It is the most common way computers store and exchange a point in time.

Why does my timestamp show the wrong time?

Most likely a seconds-vs-milliseconds mismatch. A 13-digit timestamp is milliseconds; a 10-digit one is seconds. This tool auto-detects, but external code may not.

What's the 2038 problem?

A signed 32-bit integer overflows at 2038-01-19 03:14:07Z. Systems still using 32-bit time_t will wrap to a negative number. Modern systems use 64-bit time_t and are safe.

What's the difference between UTC and GMT?

For most purposes they are identical. GMT is a time zone; UTC is a time standard. Servers and APIs always speak UTC.

Do leap seconds break Unix timestamps?

Unix time ignores leap seconds: a Unix timestamp can repeat or skip a second when one is inserted. For most applications this is invisible; precision-critical systems use TAI or similar.