Unix Timestamp Converter

Convert epoch time to dates and back, in UTC and your time zone.

Current Unix time

Timestamp to date

Date to timestamp

How to convert a Unix timestamp

  1. Paste a timestamp in seconds or milliseconds; the unit is detected automatically.
  2. Read the date in UTC, in your time zone and as ISO 8601.
  3. To go the other way, pick a date and time and copy the timestamp.

Why systems use epoch time

A single number is easy to store, sort and compare, and it means the same instant everywhere. Time zones are only applied when the time is shown to a person.

Common pitfalls

Mixing seconds and milliseconds gives dates in 1970 or far in the future. Storing local time without a zone causes errors when daylight saving time changes. Store UTC timestamps and convert at display time.

Getting the timestamp in code

JavaScript: Math.floor(Date.now() / 1000). Python: int(time.time()). Shell: date +%s. SQL databases have functions like UNIX_TIMESTAMP() or EXTRACT(EPOCH FROM …).

Frequently asked questions

What is a Unix timestamp?

The number of seconds since 1 January 1970 00:00:00 UTC, called the Unix epoch. It is the same everywhere in the world, regardless of time zone.

Seconds or milliseconds?

Unix tools and most APIs use seconds (10 digits today). JavaScript's Date.now() and Java use milliseconds (13 digits). The converter treats 13 or more digits as milliseconds.

What is the year 2038 problem?

Systems that store seconds in a signed 32-bit integer overflow on 19 January 2038. Modern systems use 64-bit values.

Does it handle daylight saving time?

Yes. Dates in your time zone use your device's time zone rules, including daylight saving time.