Unix Timestamp Converter
Convert a Unix timestamp (epoch time) to a date and a date to a timestamp, in seconds, milliseconds, microseconds or nanoseconds. See the current Unix time ticking live. Everything runs in your browser.
The current Unix time
…
Timestamp to date
Date to timestamp
Timestamps you may recognise
| Timestamp (seconds) | Date and time (UTC) |
|---|---|
| 0 | 1 January 1970, 00:00:00 (the epoch) |
| 1000000000 | 9 September 2001, 01:46:40 |
| 1700000000 | 14 November 2023, 22:13:20 |
| 2000000000 | 18 May 2033, 03:33:20 |
| 2147483647 | 19 January 2038, 03:14:07 (the 32-bit limit) |
How to get the current timestamp
| Language or tool | Code |
|---|---|
| JavaScript | Math.floor(Date.now() / 1000) |
| Python | import time; int(time.time()) |
| PHP | time() |
| Java | Instant.now().getEpochSecond() |
| MySQL | SELECT UNIX_TIMESTAMP(); |
| PostgreSQL | SELECT EXTRACT(EPOCH FROM now()); |
| Linux and macOS terminal | date +%s |
| Excel | =(NOW()-DATE(1970,1,1))*86400 (UTC) |
Seconds, milliseconds and other units
- 10 digits: seconds. Used by Unix, PHP, Python and many APIs.
- 13 digits: milliseconds. Used by JavaScript, Java and many web services.
- 16 digits: microseconds. Used in some databases and logs.
- 19 digits: nanoseconds. Used by Go and high-precision timers.
How to use the Unix Timestamp Converter tool
- To read a timestamp, type it in the first box. The unit (seconds, milliseconds ...) is detected for you.
- To get a timestamp, pick a date and time and choose your time zone or UTC.
- Press a copy button to copy any result.
Frequently asked questions
What is a Unix timestamp?
A Unix timestamp, or epoch time, is the number of seconds that have passed since 1 January 1970 at 00:00:00 UTC. It gives one number for a moment in time that means the same everywhere, which is why programs and databases use it.
How do I tell seconds from milliseconds?
Count the digits. Today's timestamps in seconds have 10 digits (for example 1700000000), in milliseconds 13 digits, in microseconds 16 and in nanoseconds 19. With the unit on Automatic, the tool picks the right one.
How do I convert a Unix timestamp to a date?
Multiply by 1,000 if it is in seconds, then pass it to a date function. In JavaScript: new Date(1700000000 * 1000). In Python: datetime.fromtimestamp(1700000000, tz=timezone.utc). Or paste it above and read the date.
Does a Unix timestamp have a time zone?
No. It always counts from the same moment in UTC, so it is the same number everywhere. Time zones only matter when you turn it into a date to show to a person, which is why this tool shows both UTC and your own time zone.
What is the year 2038 problem?
Systems that store a timestamp in a signed 32-bit integer can only count up to 2,147,483,647 seconds, which is 19 January 2038 at 03:14:07 UTC. After that the number overflows. Modern systems use 64-bit integers, which will not overflow for hundreds of billions of years.