Skip to content

Epoch & Unix Timestamp Converter - Convert Dates Online

Current Time
Unix: 
UTC: 

Read a timestamp or make one

Paste a number from a log line, an API response or a JWT exp claim and the converter shows it in UTC, in your local time zone, as ISO 8601 and as relative time ("in 3 hours", "2 days ago"). It works out the unit from the number of digits. Going the other way, type a date such as 2026-01-15T09:30:00Z into the same box to get the timestamp in seconds and milliseconds. Now fills in the current moment, and the live current timestamp is shown at the top.

Example

Input:   1708012800
UTC:     Thu, 15 Feb 2024 16:00:00 GMT
ISO:     2024-02-15T16:00:00.000Z

Paste 1708012800000 and you get the same moment, because 13 digits are read as milliseconds.

Getting the current timestamp in code

  • JavaScript: Math.floor(Date.now() / 1000) (Date.now() alone is milliseconds)
  • Python: int(time.time())
  • PHP: time()
  • Shell: date +%s
  • PostgreSQL: extract(epoch from now())

To convert a wall-clock time between places rather than to a number, use the time zone converter.

Related Tools

Frequently Asked Questions

What is a Unix timestamp?
The number of seconds since 00:00:00 UTC on 1 January 1970, ignoring leap seconds. 1708012800 is 15 February 2024, 16:00 UTC. Because it counts from a fixed moment in UTC, the same number means the same instant everywhere.
Seconds or milliseconds?
Count the digits. Current timestamps in seconds have 10 digits (Unix, PHP, Python's time.time(), JWT exp claims). Milliseconds have 13 (JavaScript's Date.now(), Java). The converter treats 13 to 15 digits as milliseconds, 16 to 18 as microseconds and 19 or more as nanoseconds (Go, some databases). Decimals such as 1700000000.123 are read as fractional seconds.
How do I convert a date to a timestamp?
Type a date string such as 2026-01-15T09:30:00Z into the same box and the result shows it in seconds and milliseconds. Include the Z or an offset like +01:00. Without one, the browser reads the date in your local time zone, so the timestamp depends on where you are.
What is the Year 2038 problem?
Systems that store the timestamp as a signed 32-bit integer overflow after 2147483647, which is 03:14:07 UTC on 19 January 2038. The next second wraps round to December 1901. JavaScript, and so this converter, has no such limit.