Epoch Converter
Convert Unix timestamps to dates and dates to Unix time, in seconds or milliseconds.
Runs in your browser. Your text and files never leave your device.
Current Unix time: …
How to convert a timestamp
- Timestamp to date: paste a value like
1700000000or1700000000000. The date shows in UTC and your local time. - Date to timestamp: pick a date and time, choose whether it is your local time or UTC, and copy the seconds or milliseconds.
In code
JavaScript: Math.floor(Date.now() / 1000). Python: int(time.time()). PHP: time(). SQL (PostgreSQL): extract(epoch from now()).
Frequently Asked Questions
What is Unix epoch time?
Unix time counts the seconds since 1 January 1970, 00:00:00 UTC (the "epoch"), ignoring leap seconds. Computers use it because it is one simple number that means the same moment everywhere.
Seconds or milliseconds?
Unix time is in seconds (10 digits today). JavaScript and Java use milliseconds (13 digits). The converter detects which one you pasted from its length.
What is the year 2038 problem?
Systems that store Unix time as a signed 32-bit number overflow on 19 January 2038 at 03:14:07 UTC. Modern systems use 64-bit numbers and are not affected.
Which time zone are the results in?
Both: the date is shown in UTC and in your device's own time zone, with its name.