How to use the Unix timestamp converter
- To read a timestamp, paste it into Unix timestamp. Leave Timestamp unit on Auto-detect, or force Seconds or Milliseconds.
- Copy any result: ISO 8601, RFC 2822, your local time, the UTC string, or the seconds and milliseconds values. Press Now to fill in the current time.
- To get a timestamp from a date, choose it in Date and time, then pick Interpret as UTC or Your local time.
How the conversion works
A Unix timestamp counts the seconds since 1970-01-01 00:00:00 UTC, the Unix epoch. Every day counts as exactly 86,400 seconds, so leap seconds are ignored, as defined in the POSIX "Seconds Since the Epoch" definition. The tool turns your number into milliseconds and hands it to the JavaScript Date object, which covers about 271,821 BC to 275760 AD (MDN: Date).
Auto-detect looks at the size of the number. Below 1e11 it reads seconds (10 digits for today's dates). From 1e11 up to 1e14 it reads milliseconds (13 digits), up to 1e17 microseconds (16 digits), and above that nanoseconds (19 digits).
Worked example
The page opens with 1700000000 in Unix timestamp and Auto-detect on. It reads that as seconds and shows 2023-11-14T22:13:20.000Z for ISO 8601, Tue, 14 Nov 2023 22:13:20 +0000 for RFC 2822 and Tue, 14 Nov 2023 22:13:20 GMT for the UTC string. Your local time and the relative time depend on your time zone and today's date. In the other panel, Date and time starts at 2023-11-14 22:13:20 with Interpret as UTC, which gives back 1700000000 seconds and 1700000000000 milliseconds.
Limits and edge cases
- A millisecond timestamp from before 3 March 1973 is below 1e11, so Auto-detect reads it as seconds. Switch Timestamp unit to Milliseconds for those.
- Negative timestamps are dates before 1970. For example, -1 is 1969-12-31T23:59:59.000Z.
- The 32-bit limits are 2147483647 (2038-01-19T03:14:07.000Z) and -2147483648 (1901-12-13T20:45:52.000Z).
- Fractions of a second are kept to the millisecond. Commas, underscores and scientific notation such as 1.7e9 are accepted.
- With Interpret as set to Your local time, a time skipped by daylight saving or repeated by it gets a note explaining which moment was used.
- This page converts one value at a time. For a whole list, use the epoch batch converter. To compare cities, use the time zone converter. To count days between two dates, use the date difference calculator.
Frequently asked questions
What is epoch time?
Epoch time is another name for Unix time. It is the number of seconds (or milliseconds) since midnight on January 1, 1970, UTC. The terms epoch time, Unix timestamp and POSIX time are interchangeable.
How can I tell if a timestamp is in seconds or milliseconds?
Count the digits. Ten digits (such as 1700000000) is seconds and thirteen digits (1700000000000) is milliseconds. This converter does the same check when Auto-detect is on.
Is a Unix timestamp the same in every time zone?
Yes. A timestamp names one instant, so it is identical everywhere. Only the readable date changes, which is why this page shows the UTC date and your local date side by side.
What happens to Unix time in 2038?
Systems that store Unix time as a signed 32-bit integer overflow on January 19, 2038 at 03:14:07 UTC and wrap to a date in 1901. Most modern platforms use 64-bit values, but old embedded devices and legacy software may need patching.
How do I get the current Unix timestamp in code?
In JavaScript, Math.floor(Date.now() / 1000) gives seconds and Date.now() gives milliseconds. In Python, int(time.time()) gives seconds and int(time.time() * 1000) gives milliseconds.
Sources: The Open Group, POSIX.1-2017, section 4.16; MDN, JavaScript Date.
Related reading: Cron Expressions Explained: How to Schedule Tasks