Dev Toolbox · Windows 10 and 11
Unix timestamp to date, and back
Paste an epoch time from a log, a database or an API and read it as a date in your time zone, in UTC, in ISO 8601 and as "2 days ago". Pick a date and time to get its Unix seconds and milliseconds. Seconds or milliseconds? The converter tells them apart by length.
How to convert a Unix timestamp
- 1
Open the Timestamp converter
In the Dev Toolbox, choose Timestamp converter under Make. It opens on the current time.
- 2
Paste the number
Put the timestamp into Unix time. Ten digits are read as seconds; anything longer than 11 characters is read as milliseconds.
- 3
Read the date
Four rows appear: Your time, UTC, ISO 8601 and Relative, each with a Copy button. Now brings back the current time.
- 4
Go the other way
Under Date and time to Unix time, pick a date and a time, down to the second, and copy the Seconds or Milliseconds.
What a Unix timestamp counts
Unix time is the number of seconds since midnight UTC on 1 January 1970, a moment called the epoch. It has no time zone and no daylight saving time: 1700000000 is the same instant everywhere, 22:13:20 UTC on 14 November 2023, which was 5:13 PM in New York and early morning on the 15th in Tokyo. That is why systems store and exchange it. Compare two numbers and you know which came first; subtract them and you have the seconds in between.
A few landmarks help you sanity-check a number at a glance:
| Unix seconds | Date and time (UTC) |
|---|---|
| 0 | 1 January 1970, 00:00:00 |
| 1,000,000,000 | 9 September 2001, 01:46:40 |
| 1,700,000,000 | 14 November 2023, 22:13:20 |
| 2,000,000,000 | 18 May 2033, 03:33:20 |
| 2,147,483,647 | 19 January 2038, 03:14:07 |
Unix time also ignores leap seconds: every day counts as exactly 86,400 seconds, which keeps the arithmetic simple.
Seconds, milliseconds and other lengths
The most common timestamp mistake is mixing up seconds and milliseconds. Unix tools, PHP, Python's int(time.time()), JWTs and most databases count seconds: 10 digits for any date between 2001 and 2286. JavaScript's Date.now(), Java's System.currentTimeMillis() and many JSON APIs count milliseconds: 13 digits today. Read milliseconds as seconds and you land tens of thousands of years in the future; read seconds as milliseconds and you are back in January 1970.
Octoolo decides by length: up to 11 characters means seconds, anything longer means milliseconds. Two kinds of input slip past that rule, so trim them first:
- Seconds with decimals, such as 1700000000.25 from Python's time.time(), are longer than 11 characters and would be read as milliseconds. Drop the part after the point.
- Microseconds and nanoseconds (16 and 19 digits, from some databases, Go programs and system logs) are read as milliseconds too. Keep only the first 13 digits.
Time zones, ISO 8601 and the date picker
Your time uses the time zone Windows is set to, with the date written out in full and the zone shown. UTC is the same instant at zero offset, and ISO 8601 gives the machine-friendly form, 2023-11-14T22:13:20.000Z, where the Z stands for UTC. That is the form to put in JSON, logs and SQL: it sorts correctly as text, and nobody has to guess the zone.
Relative says how far away the moment is: "3 hours ago", "in 2 months", "yesterday". It is the quickest way to see whether a token, a cache entry or a scheduled job lies in the past.
The date picker works the other way, and reads what you pick as your own local time. This tool has no time-zone picker. To find the timestamp of 9:00 in Tokyo, first turn that into your own time with the time zone converter in Octoolo's Calculator, then pick it here.
The year 2038, and other ways on Windows
Many older systems keep Unix time in a signed 32-bit integer, which runs out at 2,147,483,647: 03:14:07 UTC on 19 January 2038. One second later it wraps around to December 1901. Current operating systems, databases and languages have moved to 64-bit time, but embedded devices, old file formats and database columns typed as a 32-bit integer still carry the limit. If you are choosing a column type for timestamps today, make it 64-bit. The converter itself has no such limit and handles dates far beyond 2038.
Without Octoolo, PowerShell's [DateTimeOffset]::FromUnixTimeSeconds(1700000000) turns seconds into a date, and [DateTimeOffset]::UtcNow.ToUnixTimeSeconds() gives the current Unix time. In Excel, =A1/86400+DATE(1970,1,1) turns seconds in cell A1 into a UTC date once the cell is formatted as a date and time.
Questions, answered
What is the difference between a Unix timestamp and an epoch timestamp?
None. Epoch time, Unix time and POSIX time all name the same count of seconds since 1 January 1970 UTC.
Is a Unix timestamp in UTC?
Yes. The number itself has no time zone; it counts from a moment defined in UTC. A zone only comes in when it is shown as a date, which is why Octoolo shows both your local time and UTC.
Can it convert negative timestamps and dates before 1970?
Yes. A negative number counts back from 1970, so -86400 is midnight UTC on 31 December 1969. The date picker gives negative values for earlier dates too.
Why is my converted date off by a few hours?
The number was probably made from a local time as if it were UTC, or the other way round. A gap of whole hours between the UTC row and what the source system claims points to a time-zone mix-up, not a wrong timestamp.
Does it allow for daylight saving time?
Yes, in your own zone. Your time applies Windows' rules for that particular date, so a July timestamp shows summer time even when you convert it in winter.
How do I get the current Unix time?
Press Now. The current time in seconds fills the Unix time box, with all four readings below it.
Unix timestamp converter, and 16 more apps.
Download for Windows7 days free, then from $3.99 a month for all 17 apps. Windows 10 and 11.