Unix timestamp / epoch converter
Convert Unix epoch timestamps and dates in your browser. Detects seconds and milliseconds, and shows UTC as ISO 8601.
How it works
- Values โฅ 1,000,000,000,000 are treated as milliseconds. Convert to timestamp and Use now write seconds. The date picker is local time.
- Current Unix time (seconds)
- โ
- Current UTC
- โ
- Interpreted unit
- โ
- Seconds
- โ
- Milliseconds
- โ
- UTC (ISO 8601)
- โ
- Local time
- โ
About Unix timestamps
What is Unix time?
Unix time, also called epoch time or POSIX time, is the number of seconds since 1970-01-01T00:00:00Z, not counting leap seconds.
This page converts in your browser. Ten-digit values are seconds. Values with 13 or more digits are milliseconds. The date picker is local time; UTC is shown as ISO 8601.
Get the current Unix timestamp
- JavaScript
Math.floor(Date.now() / 1000)- Python
int(time.time())- SQL
EXTRACT(EPOCH FROM now()) -- PostgreSQL UNIX_TIMESTAMP() -- MySQL
Unix timestamp FAQ
- What is a Unix timestamp?
- A Unix timestamp, also called epoch time or POSIX time, is the number of seconds since 1970-01-01T00:00:00Z, not counting leap seconds.
- How do I tell seconds from milliseconds?
- Values with 13 or more digits are treated as milliseconds. Convert to timestamp and Use now write seconds.
- What is the Year 2038 problem?
- Signed 32-bit Unix time overflows on 19 January 2038. This page uses JavaScript numbers, so it is not limited to 32-bit seconds.
- How do I get the current Unix timestamp in code?
- In JavaScript use Math.floor(Date.now() / 1000). In Python use int(time.time()). In PostgreSQL use EXTRACT(EPOCH FROM now()). In MySQL use UNIX_TIMESTAMP().