Tech

Unix timestamp converter

Convert a Unix timestamp (epoch) to a human-readable date in UTC and local time, or turn a date into an epoch in seconds and milliseconds. All in your browser.

Instant🔒In your browserNo signup
Live

Current timestamp

Seconds
Milliseconds

Timestamp → date

Date → timestamp

What is a Unix timestamp

A Unix timestamp (also called epoch time or POSIX time) is the number of seconds elapsed since midnight on January 1, 1970 in UTC. That instant is known as the epoch. It is the most common way to represent time in computer systems because it is a single number, with no ambiguity around time zones or regional date formats.

Key epoch facts

Quick reference table with the facts people look up most:

ConceptValue
Epoch 01970-01-01T00:00:00Z (UTC)
Timestamp in seconds10 digits (e.g. 1700000000)
Timestamp in milliseconds13 digits (e.g. 1700000000000)
Example: 1700000000 s2023-11-14T22:13:20Z
Y2038 limit (32-bit)2038-01-19T03:14:07Z (2,147,483,647)
ISO 8601 formatYYYY-MM-DDTHH:MM:SSZ (Z = UTC)

Seconds vs milliseconds

There are two widely used conventions. The original Unix one counts in seconds (10 digits today, e.g. 1700000000). JavaScript, however, works in milliseconds (13 digits, e.g. 1700000000000). Mixing them up is the most common mistake: if you treat milliseconds as seconds, you get a date in the year 56,000. This tool detects the unit by digit count, but you can force it with the selector.

UTC and local time

A timestamp represents an absolute instant, always in UTC. To show it to a person you convert it to their time zone. That is why we give you both views: the ISO 8601 in UTC (ending in Z) and your device's local time. If you work with server logs across regions, always store UTC and convert only when displaying.

The ISO 8601 format

ISO 8601 is the standard for writing dates as unambiguous text: 2023-11-14T22:13:20Z. It starts with the year, then month and day, the T separates date from time, and the Z marks UTC (Zulu). Its big advantage is that it sorts alphabetically the same way it sorts chronologically, ideal for APIs, databases and files.

The Year 2038 problem

Many older systems store the timestamp in a signed 32-bit integer. That type maxes out at 2,147,483,647, a value reached on January 19, 2038 at 03:14:07 UTC. Past that point the counter overflows and jumps to negative dates (1901). The fix, already adopted on most modern platforms, is to use 64-bit integers, which leave room for billions of years.

Common uses

  • Databases: store created_at and updated_at as epoch to compare and sort fast.
  • APIs and JWT: the iat and exp fields of a token are timestamps in seconds.
  • Logs: correlate events across services using a shared clock in UTC.
  • Cache and expiry: check whether something expired by comparing now against a stored epoch.
  • Cron and scheduling: define when a task should run without time-zone headaches.

FAQ

What is a Unix timestamp?

The seconds elapsed since January 1, 1970 at 00:00 UTC (the epoch). A universal way to represent a point in time.

Seconds or milliseconds?

Seconds have 10 digits; milliseconds have 13. JavaScript uses ms; Unix and databases usually use seconds.

How is the unit detected?

By digit count: 13 or more is milliseconds, 10 or fewer is seconds. You can also force it.

Why show UTC and local time?

UTC is the absolute instant with no offset; local time applies your device zone. Seeing both avoids confusion.

What is the Year 2038 problem?

Signed 32-bit integers overflow on 2038-01-19. It is solved by using 64-bit integers.

What is ISO 8601?

The standard for writing dates as text, e.g. 2023-11-14T22:13:20Z. The Z means UTC.

Is my data sent to a server?

No. Everything runs in your browser with the JavaScript Date API. Nothing is uploaded.

Was this generator useful?