Epoch and Unix Timestamp Converter
Enter a Unix timestamp to see the date, or enter a date and time to get the timestamp. Choose seconds or milliseconds and a UTC offset. It all happens in your browser.
Last reviewed
Date and time
2023-11-14T22:13:20Z
Tuesday 14 November 2023, 22:13:20
- Day of the week
- Tuesday
- Day of the year
- 318
- Seconds
- 1700000000
- Milliseconds
- 1700000000000
Unix time counts the seconds since 1 January 1970, 00:00:00 UTC, treating every day as exactly 86,400 seconds, so leap seconds are not counted. A timestamp has no time zone: the offset only changes how it is shown.
What epoch time is
A Unix timestamp, or epoch time, is a single number that names a moment: the count of seconds since 00:00:00 UTC on 1 January 1970, the Epoch. Computers favour it because it is one number, it sorts, it subtracts to give a duration, and it means the same thing in every time zone.
POSIX, the standard behind Unix, defines it in “Seconds Since the Epoch”: every day is accounted for by exactly 86,400 seconds. So leap seconds are not counted, and a timestamp can be turned into a date with plain arithmetic.
From a timestamp to a date
The tool divides the timestamp by 86,400 to get a day count and a time of day, then turns the day count into a calendar date with the rules of the Gregorian calendar, which it extends back to the year 1. Weekdays follow from the day count: the Epoch day, 1 January 1970, was a Thursday.
A timestamp has no time zone, but its date does. The UTC offset field lets you see the same moment on a clock elsewhere. A timestamp of 1700000000 is 22:13:20 UTC on 14 November 2023. At an offset of +5 hours the clock reads 03:13:20 on 15 November 2023.
From a date to a timestamp
POSIX gives the formula for the seconds since the Epoch from a broken-down time, with tm_year the years since 1900 and tm_yday the days since 1 January:
tm_sec + tm_min × 60 + tm_hour × 3600 + tm_yday × 86400 + (tm_year − 70) × 31536000 + ((tm_year − 69) ÷ 4) × 86400 − ((tm_year − 1) ÷ 100) × 86400 + ((tm_year + 299) ÷ 400) × 86400
with whole-number division. For 13 February 2009 at 23:31:30 UTC, tm_year is 109 and tm_yday is 43, so the sum is 84,690 + 3,715,200 + 1,229,904,000 + 864,000 − 86,400 + 86,400 = 1,234,567,890.
Well-known timestamps
| Timestamp | Date and time (UTC) | Weekday |
|---|---|---|
| 0 | 1970-01-01T00:00:00Z | Thursday |
| 1000000000 | 2001-09-09T01:46:40Z | Sunday |
| 1234567890 | 2009-02-13T23:31:30Z | Friday |
| 1700000000 | 2023-11-14T22:13:20Z | Tuesday |
| 951782400 | 2000-02-29T00:00:00Z | Tuesday |
| 2147483647 | 2038-01-19T03:14:07Z | Tuesday |
| -1 | 1969-12-31T23:59:59Z | Wednesday |
| 4102444800 | 2100-01-01T00:00:00Z | Friday |
The row for 2000-02-29 is a leap day: 2000 is a leap year because it divides by 400. The year 2100 is not a leap year, because it divides by 100 but not by 400.
The year 2038
The largest number a signed 32-bit integer can hold is 2,147,483,647, and as a timestamp that is 03:14:07 UTC on 19 January 2038. A system that stores seconds in 32 bits wraps to a negative number one second later, which looks like December 1901. Most modern systems use 64 bits.
Seconds, milliseconds and other units
A timestamp is usually in seconds, with 10 digits today. JavaScript’s Date and Java use milliseconds, 13 digits. Some systems use microseconds or nanoseconds. Choose the unit before you convert, since a millisecond value read as seconds lands in the year 55,000.
Common mistakes
- Mixing seconds and milliseconds. Count the digits.
- Assuming a timestamp has a zone. It does not.
- Using a UTC offset for daylight saving. An offset is fixed. Choose the offset in force on that date.
- Counting leap seconds. Unix time ignores them.
- Forgetting that months start at 1 here. January is 1, not 0.
For a named time zone use the time zone converter, and for the gap between two dates the days between dates calculator. The cron expression generator schedules jobs by date and time.
How it is calculated
The conversion uses whole-number arithmetic only, with a civil-calendar algorithm, so it does not depend on the browser’s Date object or any time zone data and gives the same answer everywhere. It covers the years 1 to 9999.
Frequently asked questions
What is a Unix timestamp?
The number of seconds since 00:00:00 UTC on 1 January 1970, called the Epoch. POSIX defines it so that every day counts as exactly 86,400 seconds, which means leap seconds are not counted. It is the same number everywhere in the world at the same instant.
How do I tell seconds from milliseconds?
By the length. A current timestamp in seconds has 10 digits, for example 1700000000. In milliseconds it has 13 digits, 1700000000000. JavaScript and Java use milliseconds, while Unix tools and many APIs use seconds.
What time zone is a timestamp in?
None. It counts seconds from a fixed instant, so it is an absolute moment. The time zone only matters when you show it as a date. The offset field shows the same moment at another UTC offset.
What happens in 2038?
A signed 32-bit integer counts up to 2,147,483,647 seconds, which is 03:14:07 UTC on 19 January 2038. Systems that store the time in 32 bits overflow one second later. 64-bit timestamps do not have the problem.
Can a timestamp be negative?
Yes. A negative number is a moment before 1970. A timestamp of −1 is 23:59:59 UTC on 31 December 1969. The tool handles years 1 to 9999.
Does it account for daylight saving time?
No. It uses a fixed UTC offset that you choose, not a named time zone, because the rules for daylight saving change by place and year. To see the time in a named zone, use the time zone converter.
Related calculators
- Time Zone ConverterChoose the place and the time you start from, add the places you want to compare, and the page shows the local time, date and UTC offset in each, with daylight saving applied for that date.
- Days Between Dates CalculatorPick a start date and an end date.
- URL Encoder and DecoderPaste text to percent-encode it for a URL, or paste an encoded string to read it.
- JWT DecoderPaste a JSON Web Token.
- Cron Expression GeneratorFill in the minute, hour, day of month, month and day of week, or start from a common schedule.
- IP Subnet CalculatorEnter an IPv4 address with a prefix such as 192.