Unix Timestamp Converter

// timestamp ↔ date · seconds & milliseconds · all timezones · live clock

current unix timestamp
0
live
0 ms
timestamp → date
UTC
Local
ISO 8601
Relative
Day of week
date → timestamp
Unix (s)
Unix (ms)
ISO 8601
UTC string
quick reference — click to convert

What is a Unix timestamp?

A Unix timestamp is the number of seconds that have elapsed since January 1, 1970 00:00:00 UTC (the Unix epoch). It's a timezone-independent way to represent a moment in time, widely used in databases, APIs, and programming languages.

Seconds vs milliseconds

Unix timestamps in seconds are 10 digits long (e.g. 1700000000). Millisecond timestamps are 13 digits (e.g. 1700000000000). JavaScript's Date.now() returns milliseconds. Most databases and APIs use seconds.

Frequently Asked Questions

What is the Unix epoch?+
The Unix epoch is January 1, 1970, 00:00:00 UTC — the reference point from which Unix timestamps are counted. This date was chosen somewhat arbitrarily when Unix was being developed in the late 1960s.
What is the Year 2038 problem?+
32-bit systems store Unix timestamps as a signed 32-bit integer, which maxes out at 2,147,483,647 — corresponding to January 19, 2038. After that, the counter overflows to a negative number. Modern 64-bit systems don't have this problem.
How do I get the current timestamp in code?+
JavaScript: Math.floor(Date.now()/1000) (seconds) or Date.now() (ms). Python: import time; time.time(). PHP: time(). SQL: UNIX_TIMESTAMP() (MySQL) or EXTRACT(EPOCH FROM NOW()) (PostgreSQL).