Skip to content

Epoch/Unix Timestamp Converter

Convert between epoch timestamps and dates

Frequently asked questions

What is a Unix timestamp?

A Unix timestamp (epoch time) is the number of seconds elapsed since 00:00:00 UTC on 1 January 1970. It is a universal, timezone-independent way to represent a point in time used in databases, APIs, and logs.

Seconds vs milliseconds — how do I know which one I have?

A 10-digit number is almost always seconds (e.g. 1715000000). A 13-digit number is milliseconds (e.g. 1715000000000). This converter detects the length automatically.

What is the Year 2038 problem?

Many older 32-bit systems store Unix time as a signed 32-bit integer, which overflows on 2038-01-19 at 03:14:07 UTC (value 2 147 483 647). Modern 64-bit systems are not affected.

How do I convert epoch time in JavaScript?

Use new Date(timestamp * 1000) for seconds, or new Date(timestamp) for milliseconds. To get the current Unix time use Math.floor(Date.now() / 1000).