Unix Timestamp Converter
Convert a Unix epoch timestamp to a date in UTC and your time zone, or a date and time to a timestamp. Seconds, milliseconds, microseconds and nanoseconds are detected automatically.
Timestamp to date
Date to timestamp
Related Developer Tools
This Unix timestamp converter turns an epoch time such as 1700000000 into a date you can read, in UTC and in your own time zone, and turns a date and time back into a timestamp. It shows the current Unix time ticking at the top, recognises seconds, milliseconds, microseconds and nanoseconds from the length of the number, and gives each result in ISO 8601 and HTTP date formats ready to copy into code, SQL or a log search.
Reference Timestamps
| Timestamp (seconds) | Date and time (UTC) | Note |
|---|---|---|
0 | 1970-01-01 00:00:00 | The Unix epoch |
1000000000 | 2001-09-09 01:46:40 | The first 10-digit timestamp |
1700000000 | 2023-11-14 22:13:20 | |
2000000000 | 2033-05-18 03:33:20 | |
2147483647 | 2038-01-19 03:14:07 | Largest signed 32-bit value |
-86400 | 1969-12-31 00:00:00 | Negative means before 1970 |
Converting a Date to a Timestamp
A date and time on a clock only becomes a single moment once you say where that clock is: 09:00 in Karachi is four hours earlier than 09:00 in London in summer. So in Date to timestamp, pick the time zone the date was written in. The converter uses your browser's time zone database, so daylight saving time is taken into account. A time that does not exist because clocks jumped forward is moved on by the length of the jump (02:30 on the night clocks go from 02:00 to 03:00 becomes 03:30), and a time that happens twice when clocks go back is read as the first of the two, the same rules JavaScript's own Date follows.
Output Formats
- ISO 8601 (UTC), e.g.
2023-11-14T22:13:20.000Z: the format of JSON APIs, JavaScript'stoISOString()and most databases. TheZmeans UTC. - Your time zone, e.g.
2023-11-15T03:13:20+05:00: the same moment written with your local offset from UTC. - RFC 2822 / HTTP, e.g.
Tue, 14 Nov 2023 22:13:20 GMT: used in HTTP headers such asExpiresandLast-Modified, and in email.
Related Tools
The exp and iat claims in a JSON Web Token are Unix timestamps; the JWT decoder converts them for you. Version 7 UUIDs also carry a timestamp, which the UUID generator can read.
Frequently Asked Questions
What is a Unix timestamp?
The number of seconds since 00:00:00 UTC on 1 January 1970, called the Unix epoch. It is the same number everywhere in the world at a given moment, which is why databases, APIs and log files use it to store times without worrying about time zones.
How do I convert a timestamp to a date?
Paste it into Timestamp to date. The date appears in UTC (ISO 8601), in your own time zone, and in the HTTP date format, along with how long ago or ahead it is. Pick any other time zone below the table to see the same moment there.
Is my timestamp in seconds or milliseconds?
Count the digits. Current times are 10 digits in seconds (as in PHP, Python's time.time() and most Unix tools), 13 in milliseconds (JavaScript's Date.now() and Java), 16 in microseconds and 19 in nanoseconds (Go's UnixNano). The converter does this for you and says which unit it used; choose the unit yourself for dates far from today.
How do I get the current timestamp in code?
JavaScript: Math.floor(Date.now() / 1000). Python: int(time.time()). PHP: time(). Java: Instant.now().getEpochSecond(). Go: time.Now().Unix(). MySQL: UNIX_TIMESTAMP(). Linux or macOS shell: date +%s. All give seconds; JavaScript's Date.now() on its own gives milliseconds.
What is the year 2038 problem?
Systems that store Unix time as a signed 32-bit integer can count only up to 2,147,483,647, which is 03:14:07 UTC on 19 January 2038. One second later the number overflows and wraps to a date in 1901. Software that uses 64-bit time, as modern operating systems and languages do, is not affected.
Do Unix timestamps include leap seconds?
No. Unix time treats every day as exactly 86,400 seconds, so leap seconds are not counted and a timestamp can be converted to a UTC date with simple arithmetic.
Can a timestamp be negative?
Yes. A negative timestamp is a moment before 1970: -86400 is 31 December 1969, 00:00 UTC.