Free tool · Developer tools
Unix timestamp converter
Paste an epoch number to see the date in UTC and in the time zone you choose, or type a date to get its timestamp. Everything runs in your browser.
- Free
- No sign-up
- Runs in your browser
- Read as seconds
- UTC
- Seconds
- 1700000000
- Milliseconds
- 1700000000000
- ISO 8601 (UTC)
- 2023-11-14T22:13:20.000Z
- UTC
- Tue, 2023-11-14 22:13:20 UTC+00:00
How to use the Unix Timestamp Converter
- Choose Timestamp to date or Date to timestamp under Convert.
- Enter the Unix timestamp, or the Date and time in the form 2024-01-15 13:30:00. Press Use current time to fill both with now.
- Leave Unit on Detect, or force seconds, milliseconds, microseconds or nanoseconds.
- Pick a Time zone: your own, UTC, or a city. Read the answer under Result and press Copy.
What is a Unix timestamp, and how do I convert it to a date?
A Unix timestamp, or epoch time, counts seconds from the Epoch, which POSIX defines as 00:00:00 on January 1, 1970 UTC. POSIX also counts every day as exactly 86,400 seconds, so leap seconds are not included. The number 0 is the Epoch, 86400 is one day later (1970-01-02T00:00:00.000Z), and 1700000000 is 2023-11-14T22:13:20.000Z. Because it is one number counted from one fixed moment, it is the same everywhere in the world, which is why logs, databases and APIs use it.
To convert, enter the number under Unix timestamp. The tool shows the date in the zone you pick and in UTC, plus the ISO 8601 form. The trailing Z in 2023-11-14T22:13:20.000Z means UTC. Negative numbers are moments before 1970: -86400 is 1969-12-31T00:00:00.000Z. The Result also lists the same moment in seconds and milliseconds.
Fractions are accepted: 1700000000.5 keeps the half second. Spaces, commas and underscores in the number are ignored, so you can paste 1,700,000,000. A quick way to do the arithmetic yourself: 60 seconds make a minute, 3,600 an hour, 86,400 a day, 604,800 a week and 31,536,000 a 365-day year.
Seconds or milliseconds: how can I tell?
Count the digits. A timestamp in seconds has 10 digits for dates from 2001-09-09 to 2286-11-20, for example 1700000000. In milliseconds the same moment is 13 digits, 1700000000000, and the tool gives 2023-11-14T22:13:20.000Z for it, the same instant. Microseconds have 16 digits and nanoseconds 19. If you do not know which unit a system uses, count the digits of a current value.
With Unit set to Detect, the tool reads numbers below 100 billion as seconds, below 100 trillion as milliseconds, below 100 quadrillion as microseconds and anything larger as nanoseconds. The numbers 99999999999 and 100000000000 sit on either side of the first limit, and Detect reads them as seconds (5138-11-16T09:46:39.000Z) and milliseconds (1973-03-03T09:46:40.000Z). The guess is only wrong for milliseconds before March 1973, which look like seconds. Read as seconds instead, 100000000000 would be 5138-11-16T09:46:40.000Z. If you know the unit, choose it and the result is exact. The chip under the result says which unit was used.
Precision matters at the top end. A nanosecond timestamp has 19 digits, more than a JavaScript number can hold exactly, so the converter keeps the date correct to the millisecond and no finer.
How do I convert a date to a Unix timestamp?
Choose Date to timestamp, type the date as year-month-day and, if you want, the time, then pick the zone the clock reading belongs to. The tool gives the seconds and the milliseconds. Doing it by hand shows what it computes: count the whole days from January 1, 1970 to the date, multiply by 86,400, then add the seconds since midnight. For 2024-01-15 at midnight UTC the answer is 1705276800, which is 19737 days times 86,400. Add 13 hours 30 minutes (48600 seconds) and you get 1705325400.
The time part is optional, and seconds are optional too. A date alone means midnight in the chosen zone. A fraction after the seconds, such as 13:30:00.250, is read as milliseconds. A date that does not exist, such as 2023-02-30, is refused with a message instead of being rolled forward to March.
Dates before 1970 give negative results. Midnight UTC on 1969-12-31 is -86400, one day before the Epoch. A timestamp of exactly 0 is the Epoch itself, 1970-01-01, so a date that shows up as 1970 usually means the value was zero or empty where you got it.
Which time zone is used when I convert a timestamp?
The timestamp itself has no time zone; the zone only changes how the date is written. The list offers your own zone (taken from your browser), UTC and fifteen major cities, using the time zone database built into your browser. The result includes the offset and follows daylight saving. In New York, timestamp 1705000000 is Thu, 2024-01-11 14:06:40 UTC-05:00, and 1720000000 is Wed, 2024-07-03 05:46:40 UTC-04:00: the offset changed from UTC-05:00 in winter to UTC-04:00 in summer.
In Date to timestamp mode, the date you type is read as wall-clock time in the chosen zone. The date 2024-01-15 13:30:00 gives 1705325400 in UTC, 1705343400 in New York and 1705293000 in Tokyo: the same clock reading is a different moment in each place. If you type a time that happens twice when clocks go back, the first occurrence is used. To read a date as UTC regardless of the zone, add a Z at the end, for example 2024-01-15T13:30:00Z.
What is the Year 2038 problem?
The Year 2038 problem comes from storing seconds in a signed 32-bit integer, whose largest value is 2,147,483,647. Enter that number and the tool shows 2038-01-19T03:14:07.000Z. One second later the counter overflows to -2,147,483,648, which is 1901-12-13T20:45:52.000Z, a date in 1901. Software that keeps the value in 64 bits does not overflow, and this converter handles dates far beyond 2038.
An unsigned 32-bit counter, which has no negative values, lasts until 4,294,967,295, which is 2106-02-07T06:28:15.000Z. The table lists some timestamps people look up, with the date in UTC and in New York time.
| Timestamp (seconds) | What it is | UTC | New York |
|---|---|---|---|
0 | The epoch | 1970-01-01T00:00:00.000Z | Wed, 1969-12-31 19:00:00 UTC-05:00 |
86400 | One day | 1970-01-02T00:00:00.000Z | Thu, 1970-01-01 19:00:00 UTC-05:00 |
1000000000 | One billion seconds | 2001-09-09T01:46:40.000Z | Sat, 2001-09-08 21:46:40 UTC-04:00 |
1500000000 | 1.5 billion | 2017-07-14T02:40:00.000Z | Thu, 2017-07-13 22:40:00 UTC-04:00 |
1700000000 | 1.7 billion | 2023-11-14T22:13:20.000Z | Tue, 2023-11-14 17:13:20 UTC-05:00 |
2000000000 | 2 billion | 2033-05-18T03:33:20.000Z | Tue, 2033-05-17 23:33:20 UTC-04:00 |
2147483647 | Largest signed 32-bit | 2038-01-19T03:14:07.000Z | Mon, 2038-01-18 22:14:07 UTC-05:00 |
4294967295 | Largest unsigned 32-bit | 2106-02-07T06:28:15.000Z | Sun, 2106-02-07 01:28:15 UTC-05:00 |
Read the New York column to see how the zone moves the date: the epoch falls on December 31, 1969 there, because New York is five hours behind UTC in winter.
Use it with
- Base64 Encoder Decoder: encode or decode Base64.
- Box Shadow Generator: visual CSS box-shadow builder.
- Cron Expression Generator: build and explain cron schedules.
- Npgsql refuses a local DateTime for a timestamptz column (a fix on this site)
- DateTimeZone: Unknown or bad timezone (a fix on this site)
Questions
What is the Unix epoch?
It is 00:00:00 UTC on January 1, 1970, the moment a Unix timestamp of 0 refers to.
How do I convert a Unix timestamp to a date?
Enter the number, choose a time zone and read the date under Result. For example 1700000000 is 2023-11-14T22:13:20.000Z. The tool also shows the ISO 8601 and UTC forms.
How do I tell seconds from milliseconds?
Seconds have 10 digits for current dates and milliseconds have 13. 1700000000 and 1700000000000 are the same moment, 2023-11-14T22:13:20.000Z. The tool detects the unit, and you can override it with the Unit menu.
What is the Year 2038 problem?
A signed 32-bit seconds counter overflows after 2,147,483,647, which is 2038-01-19T03:14:07.000Z. One second later it wraps to 1901-12-13T20:45:52.000Z. Systems that store 64 bits are not affected.
How do I get the current timestamp?
Press Use current time to fill the fields with now, then read the seconds and milliseconds under Result.
Does the timestamp depend on my time zone?
No. A Unix timestamp is the same for everyone. Only the written date changes with the zone: 1700000000 is Tue, 2023-11-14 22:13:20 UTC+00:00 in UTC and Wed, 2023-11-15 07:13:20 UTC+09:00 in Tokyo.
Sources
How this page was made: the tool's results are computed in your browser by the code on this page, using the sources listed above; the explanations were drafted with AI help and checked against the tool's own output.