Unix timestamp converter

See the current Unix time, turn any epoch timestamp into a readable date in your time zone and UTC, or turn a date back into a timestamp.

  • 100% free
  • Runs in your browser
  • No uploads
Current Unix timestamp

 

 

Timestamp to date

Date to timestamp

Read the date as

Read in your time zone, including daylight saving time on that date.

How to convert a Unix timestamp

  1. Type or paste the timestamp. Seconds, milliseconds, microseconds or nanoseconds are detected from the number of digits.
  2. Read the date. It's shown in your time zone, in UTC and in ISO 8601, with how long ago or how far ahead it is.
  3. Going the other way? Pick a date and time under Date to timestamp, and choose whether it's in your time zone or in UTC.
  4. Copy what you need. Every row has its own Copy button.

Timestamps worth knowing

Timestamp (s)Date (UTC)Why it matters
01 Jan 1970, 00:00:00The Unix epoch. A date shown as 1970 usually means a missing value.
10000000009 Sep 2001, 01:46:40The first 10-digit timestamp
170000000014 Nov 2023, 22:13:20A round number often used in examples
214748364719 Jan 2038, 03:14:07Largest signed 32-bit value (the year 2038 problem)
-8640031 Dec 1969, 00:00:00Negative timestamps are dates before 1970

Seconds, milliseconds and beyond

The same moment can be written in different units. 14 November 2023, 22:13:20 UTC is 1700000000 in seconds, 1700000000000 in milliseconds, 1700000000000000 in microseconds (used by some databases and Python's datetime) and 1700000000000000000 in nanoseconds (Go, InfluxDB, Linux file times).

To convert, multiply or divide by 1,000 for each step. A date that comes out tens of thousands of years in the future almost always means milliseconds were read as seconds.

Common mistakes

  • Storing local time as a timestamp. Convert local times to UTC first; otherwise every reading is off by the time zone offset.
  • Mixing units. JWT exp and iat are seconds; JavaScript dates are milliseconds. Check before comparing.
  • Rounding instead of flooring. Turning 1700000000.9 seconds into a whole number should give 1700000000, the second it belongs to.

Frequently asked questions

What is a Unix timestamp?

The number of seconds since 00:00:00 UTC on 1 January 1970, called the Unix epoch, not counting leap seconds. It's the same number everywhere in the world at the same moment, which is why programs store time this way and only apply a time zone when showing it.

Is my timestamp in seconds or milliseconds?

Count the digits. Timestamps for today's dates have 10 digits in seconds (1700000000) and 13 in milliseconds (1700000000000). JavaScript's Date.now() and Java's System.currentTimeMillis() give milliseconds; Unix tools, PHP's time() and Python's time.time() give seconds. The converter detects the unit from the length, and you can override it.

What happens in 2038?

Systems that store the timestamp as a signed 32-bit number can count only to 2,147,483,647, which is 03:14:07 UTC on 19 January 2038. One second later the number wraps to a date in 1901. 64-bit timestamps, now used by most systems, last for billions of years.

How do I get the current timestamp in code?

JavaScript: Math.floor(Date.now() / 1000). Python: int(time.time()). PHP: time(). Bash: date +%s. SQL: in PostgreSQL extract(epoch from now()), in MySQL UNIX_TIMESTAMP().

Does daylight saving time affect timestamps?

No. A timestamp is always UTC, so it never jumps. Daylight saving only changes how a timestamp is shown in a local time zone. When you convert a local date to a timestamp, the converter uses the offset that applied on that date in your time zone.