In this article
What Unix time is
Unix time counts the seconds since 00:00:00 UTC on 1 January 1970, a moment called the “epoch”. So 0 is the start of 1970, 86400 is one day later, and 1767225600 is 1 January 2026 at midnight UTC. Computers like this format because it is a single number that is easy to store, compare and do arithmetic with, with no time zones or daylight saving to worry about.
Seconds, milliseconds or microseconds?
| Digits (today) | Unit | Common in |
|---|---|---|
| 10 | Seconds | Unix, PHP, Python time(), JWTs, most APIs |
| 13 | Milliseconds | JavaScript Date.now(), Java |
| 16 | Microseconds | Some databases and high-precision logs |
The Timestamp Converter detects the unit from the number of digits. If you ever see a date in January 1970, a seconds value was probably read as milliseconds.
How to convert
- Paste a timestamp, or a date such as
2026-01-01 12:00, into the converter. - Read it as UTC, ISO 8601, RFC 2822, your local time and a relative description such as “in 3 days”.
- Use the live current Unix time, with one-click copy, for testing.
Unix timestamp examples
| Timestamp (seconds) | Date and time (UTC) |
|---|---|
| 0 | 1 January 1970, 00:00:00 |
| 1000000000 | 9 September 2001, 01:46:40 |
| 1700000000 | 14 November 2023, 22:13:20 |
| 2000000000 | 18 May 2033, 03:33:20 |
| 2147483647 | 19 January 2038, 03:14:07 (the largest value a signed 32-bit number can hold) |
The same moments in milliseconds simply have three more zeros, for example 1700000000000.
Timestamps are always UTC
A timestamp represents a single moment worldwide. Local time is applied only when displaying it. A subscription that expires at 1767225600 expires at midnight UTC, which is 5:00 in the morning in Pakistan and 7:00 pm on 31 December in New York. Many “it expired early” support tickets come down to this.
Writing dates people and machines agree on
Use ISO 8601: 2026-11-20T14:30:00Z. The Z means UTC; offsets such as +05:00 state a local zone. Avoid formats like 03/04/2026, which means 3 April in Pakistan and the UK but March 4 in the USA.
The year 2038 problem
Older systems store Unix time as a signed 32-bit number, which runs out at 03:14:07 UTC on 19 January 2038, when it wraps around to 1901. Modern systems use 64-bit numbers that will last for billions of years, but embedded devices and old databases may still be affected, similar to the Y2K issue.
Leap seconds
Unix time ignores leap seconds: every day is treated as exactly 86,400 seconds. That keeps calculations simple and is why converters and JavaScript agree.
Timestamps in spreadsheets
Excel and Google Sheets store dates as days since 1899-12-30, not seconds since 1970. To turn a Unix timestamp in cell A1 into a spreadsheet date, use =A1/86400+DATE(1970,1,1) and format the cell as a date, remembering the result is in UTC. For milliseconds, divide by 86,400,000 instead.
Handy calculations
- 1 hour = 3,600 s; 1 day = 86,400 s; 30 days = 2,592,000 s.
- Expiry in 7 days: current timestamp + 604,800.
- Difference between two timestamps ÷ 86,400 = days between them.
For calendar maths with real dates, the Date Calculator is easier. To inspect expiry times inside login tokens, use the JWT Decoder.
Converting timestamps in Excel and JavaScript
For a single value, paste it into the Unix Timestamp Converter. For a whole column or for code, these formulas do the same job.
Excel and Google Sheets
If cell A2 holds a timestamp in seconds, put this in B2 and format B2 as a date and time:
=A2/86400+DATE(1970,1,1)
For milliseconds (13 digits), divide by 86400000 instead. The result is in UTC. To show Pakistan time, add 5 hours with +5/24 at the end. To go the other way, from a date in B2 back to seconds, use =(B2-DATE(1970,1,1))*86400.
JavaScript
- Current time in seconds:
Math.floor(Date.now() / 1000) - Seconds to a readable date:
new Date(1767225600 * 1000).toISOString()gives2026-01-01T00:00:00.000Z - Date to seconds:
Math.floor(new Date("2026-01-01T00:00:00Z").getTime() / 1000) - Local time in a chosen zone:
new Date(1767225600 * 1000).toLocaleString("en-GB", { timeZone: "Asia/Karachi" })
The most common bug is mixing seconds and milliseconds. JavaScript dates use milliseconds, while most APIs and databases use seconds, so always multiply or divide by 1000 at the boundary.
Frequently asked questions
What is a Unix timestamp?
The number of seconds since 1 January 1970 at midnight UTC.
Why do some timestamps have 13 digits?
They count milliseconds instead of seconds.
Do Unix timestamps include time zones?
No. They are always UTC. Time zones are applied when the time is displayed.
What is the year 2038 problem?
Systems that store timestamps as 32-bit numbers overflow on 19 January 2038.
How do I convert a timestamp to a date?
Paste it into a timestamp converter and choose your time zone.
What is a Unix timestamp?
It is a count of the seconds that have passed since 00:00:00 UTC on 1 January 1970, ignoring leap seconds. Computers use it because a single number is easy to store, sort and compare.
How do I know if a timestamp is in seconds or milliseconds?
Count the digits. Current dates are 10 digits in seconds and 13 digits in milliseconds. If a converter shows a date in 1970 or far in the future, you probably used the wrong unit.
Is a Unix timestamp the same in every time zone?
Yes. It always counts from UTC, so the same moment has the same timestamp everywhere. Only the date you display changes with the time zone.