Unix timestamp converter for developers
This Unix timestamp converter translates epoch time into human-readable dates and turns dates back into timestamps. Paste a value from a log file, database column, API response or JWT, and see the exact moment in UTC and in your own local time or any other time zone you select.
What is a Unix timestamp?
A Unix timestamp counts the seconds elapsed since the Unix epoch, 00:00:00 UTC on January 1, 1970. The value 0 is that instant, 1700000000 is 22:13:20 UTC on November 14, 2023, and negative numbers are moments before 1970 (−1 is one second before midnight on December 31, 1969).
Because the count is always relative to UTC, a timestamp identifies the same instant everywhere on Earth. Time zones only come into play when you display it.
Example
Input: 1700000000 (time zone: America/New_York)
Read as seconds (auto-detected)
Local (America/New_York): Tuesday, November 14, 2023 at 5:13:20 PM EST
ISO 8601 (-05:00): 2023-11-14T17:13:20-05:00
ISO 8601 (UTC): 2023-11-14T22:13:20.000Z
UTC: Tue, 14 Nov 2023 22:13:20 GMT
RFC 2822: Tue, 14 Nov 2023 22:13:20 +0000
Unix seconds: 1700000000
Unix milliseconds: 1700000000000
Day of year · ISO week: 318 · 2023-W46
The full result also includes a relative line telling you how long ago, or how far in the future, the moment is, and every row has its own copy button.
Seconds, milliseconds, microseconds, nanoseconds
Different systems count at different resolutions, so the same instant can be written with 10, 13, 16 or 19 digits:
| Unit | Example | Typical sources |
|---|---|---|
| Seconds | 1700000000 | Unix date +%s, PHP time(), JWT exp and iat |
| Milliseconds | 1700000000000 | JavaScript Date.now(), Java System.currentTimeMillis() |
| Microseconds | 1700000000000000 | some databases and tracing systems |
| Nanoseconds | 1700000000000000000 | Go UnixNano(), GNU date +%s%N |
Auto-detect looks at the size of the number. Values below 100,000,000,000 are read as seconds, then milliseconds up to 10^14, microseconds up to 10^17, and nanoseconds above that. A note under the input tells you which unit was assumed. A millisecond value from before March 1973 is small enough to look like seconds, so pick the unit yourself for very old dates. Decimal seconds such as 1700000000.5 are accepted, and results are shown to the millisecond.
Converting dates to timestamps
To go the other way, pick a date and time in the Date → timestamp panel; it is read in the selected time zone and shown as Unix seconds, milliseconds and ISO 8601. You can also type a date instead of a number in the timestamp box. How that date is read depends on what you type:
- Date only, such as 2024-01-01, is taken as midnight UTC, giving 1704067200.
- Date and time with Z or an offset, such as 2024-01-01T00:00:00+05:30, is exact: 1704047400.
- Date and time without a zone is interpreted in your browser's local time zone, so add Z or an offset when you mean a specific zone.
- Impossible dates, such as 2023-02-29, are rejected with an error instead of being rolled over into March.
Time zones
UTC is always shown. The Time zone list sets the zone used for the local rows and for the date picker: it starts on your browser's own zone and offers IANA zone names such as America/New_York, Europe/London or Asia/Kolkata. Abbreviations like EST are ambiguous and are not in the list. Daylight saving time is applied automatically for the date in question.
Leap seconds and the year 2038
Unix time treats every day as exactly 86,400 seconds, so the 27 leap seconds added to UTC since 1972 are simply not counted. This keeps date arithmetic simple, and it means a timestamp difference can be off by a second or so across a leap second.
Systems that store timestamps as signed 32-bit integers overflow after 2147483647, which is 2038-01-19T03:14:07Z. One second later the value wraps to −2147483648 and reads as December 13, 1901. Modern systems use 64-bit time values, and this converter uses JavaScript dates, which are unaffected.
Getting a timestamp in code
JavaScript Math.floor(Date.now() / 1000)
Python int(time.time())
PHP time()
Go time.Now().Unix()
Java Instant.now().getEpochSecond()
MySQL UNIX_TIMESTAMP()
For arithmetic on dates, such as adding 30 days or finding the gap between two moments, use the date and time calculator. The time converter turns large second counts into hours or days, the JWT decoder shows the exp and iat timestamps inside a token, and the cron expression parser helps when timestamps come from scheduled jobs.