This Unix timestamp converter turns epoch time into a date you can read, and a date back into a timestamp. The top box shows the current Unix time, ticking every second. Below it you can convert in either direction, in seconds or milliseconds.
How to use the timestamp to date converter
- To convert epoch to date, type the timestamp in the first box, for example
1700000000. - Leave Unit on Detect, or choose Seconds or Milliseconds.
- Read the date in India time (IST), UTC, ISO 8601 format and your device's time zone, plus how long ago it was.
- To convert a date to a timestamp, pick the date and time, choose the time zone it is in, and copy the seconds or milliseconds.
- Click Convert it below to see the current Unix time as a date.
What a Unix timestamp is
Computers often store a moment in time as one number: the seconds since 1 January 1970, 00:00:00 UTC, called the Unix epoch. One number is easy to store, sort and compare, and it means the same moment in every country.
| Timestamp (seconds) | UTC | India time (IST) |
|---|---|---|
| 0 | 1 Jan 1970, 00:00:00 | 1 Jan 1970, 05:30:00 |
| 1000000000 | 9 Sep 2001, 01:46:40 | 9 Sep 2001, 07:16:40 |
| 1700000000 | 14 Nov 2023, 22:13:20 | 15 Nov 2023, 03:43:20 |
| 2147483647 | 19 Jan 2038, 03:14:07 | 19 Jan 2038, 08:44:07 |
Negative numbers are dates before 1970: -1 is 31 December 1969, 23:59:59 UTC.
Seconds vs milliseconds
| Unit | Digits today | Example | Used by |
|---|---|---|---|
| Seconds | 10 | 1700000000 | Unix and Linux, PHP, MySQL UNIX_TIMESTAMP(), many APIs |
| Milliseconds | 13 | 1700000000000 | JavaScript Date.now(), Java System.currentTimeMillis() |
Common mistake: A common mistake is passing seconds to JavaScript's
new Date(), which expects milliseconds.new Date(1700000000)gives a date in January 1970. Multiply by 1000 first:new Date(1700000000 * 1000).
Current Unix time in code
// JavaScript
const seconds = Math.floor(Date.now() / 1000);
const date = new Date(1700000000 * 1000);
console.log(date.toISOString()); // 2023-11-14T22:13:20.000Z
# Python
import time
from datetime import datetime, timezone
seconds = int(time.time())
print(datetime.fromtimestamp(1700000000, tz=timezone.utc).isoformat())
# 2023-11-14T22:13:20+00:00
-- MySQL
SELECT UNIX_TIMESTAMP();
The year 2038 problem
Older systems store Unix time in a signed 32-bit integer. The largest value it can hold is 2,147,483,647, which is 19 January 2038, 03:14:07 UTC. You can check that limit with the number system converter: it is 2^31 − 1, or 31 ones in binary. Modern systems use 64-bit numbers, which will not run out for billions of years.
Pro tip: Store times in UTC (or as a Unix timestamp) in your database and convert to IST only when you show them to users. It avoids time zone bugs when your app gets users in other countries.
Need the gap between two dates instead? Use the days calculator. For practice, try find the day of the week for a given date.
