This Unix timestamp converter turns an epoch timestamp into a readable UTC date and an ISO 8601 string, and converts a date and time back into a Unix timestamp in seconds and milliseconds. It recognizes 10-digit second timestamps, 13-digit millisecond timestamps and longer microsecond or nanosecond values automatically, and also shows the moment in your own browser’s time zone.
What is a Unix timestamp?
A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have passed since 00:00:00 UTC on Thursday, January 1, 1970 – the Unix epoch. It ignores leap seconds, so every day is exactly 86,400 seconds. Because it is a single number in UTC, it is the standard way to store and compare moments in databases, logs, APIs and file systems, regardless of time zone.
timestamp (s) = days since 1970-01-01 × 86,400 + seconds since midnight UTC timestamp (ms) = timestamp (s) × 1,000 date = 1970-01-01T00:00:00Z + timestamp seconds
Seconds or milliseconds?
Unix systems, PHP, Python’s time.time() and most databases use seconds; JavaScript’s Date.now(), Java and many JSON APIs use milliseconds. Count the digits of a present-day value:
| Digits (today) | Unit | Example |
|---|---|---|
| 10 | Seconds | 1700000000 |
| 13 | Milliseconds | 1700000000000 |
| 16 | Microseconds | 1700000000000000 |
| 19 | Nanoseconds | 1700000000000000000 |
The converter treats values below 100 billion as seconds (that covers every date up to the year 5138), below 100 trillion as milliseconds, and larger values as microseconds or nanoseconds.
Worked examples
- 1700000000 → 1,700,000,000 ÷ 86,400 = 19,675 days + 80,000 s. Day 19,675 after the epoch is November 14, 2023, and 80,000 s is 22:13:20, so the result is 2023-11-14T22:13:20Z (a Tuesday).
- 1700000000123 (13 digits) is read as milliseconds: 2023-11-14T22:13:20.123Z.
- January 1, 2026, 12:00 UTC → 20,454 days × 86,400 + 43,200 = 1767268800, or 1767268800000 ms.
- −1000000000 → negative timestamps count backward: 1938-04-24T22:13:20Z.
Notable Unix timestamps
| Timestamp | Date and time (UTC) |
|---|---|
| 0 | Thursday, January 1, 1970 00:00:00 – the epoch |
| 946684800 | Saturday, January 1, 2000 00:00:00 |
| 1000000000 | Sunday, September 9, 2001 01:46:40 |
| 1500000000 | Friday, July 14, 2017 02:40:00 |
| 1735689600 | Wednesday, January 1, 2025 00:00:00 |
| 1767225600 | Thursday, January 1, 2026 00:00:00 |
| 1798761600 | Friday, January 1, 2027 00:00:00 |
| 1800000000 | Friday, January 15, 2027 08:00:00 |
| 2000000000 | Wednesday, May 18, 2033 03:33:20 |
| 2147483647 | Tuesday, January 19, 2038 03:14:07 – the 32-bit limit |
Unix time vs. ISO 8601
Unix timestamps are compact and easy to compare or subtract – the difference between two timestamps is simply the elapsed seconds. ISO 8601 strings such as 2026-01-01T12:00:00Z are what humans and most modern APIs read and write. The trailing Z (“Zulu”) means UTC; an offset such as 2026-01-01T07:00:00-05:00 describes the same instant in US Eastern Standard Time. Both strings convert to 1767268800. When you log or exchange data, store the timestamp or the UTC ISO string and convert to local time only for display.
The year 2038 problem
Systems that store Unix time as a signed 32-bit integer can count only up to 2,147,483,647 seconds. One second later, at 03:14:08 UTC on January 19, 2038, the value overflows to −2,147,483,648, which such systems read as December 13, 1901. Modern operating systems, databases and languages use 64-bit time, which lasts for about 292 billion years, but embedded devices and old file formats may still be affected.
Get the current timestamp in code
JavaScript: Math.floor(Date.now() / 1000) Python: int(time.time()) PHP: time() Java: Instant.now().getEpochSecond() MySQL: SELECT UNIX_TIMESTAMP(); PostgreSQL: SELECT EXTRACT(EPOCH FROM now()); Shell: date +%s
Common pitfalls
- Time zones: a timestamp is always UTC. Converting a local wall-clock time without stating the offset is the most common source of off-by-hours bugs. This converter reads the date and time you enter as UTC; subtract your UTC offset first, or use the time zone converter.
- Seconds vs. milliseconds: passing seconds to a function that expects milliseconds gives a date in January 1970; the reverse gives a year around 55,000.
- Precision: JavaScript numbers are exact only up to 253 (about 9 quadrillion), so 19-digit nanosecond timestamps lose their last digits; keep them as strings or BigInt in code. This converter rounds to the nearest millisecond.
- Leap seconds: Unix time skips them, so it is not a count of physical SI seconds since 1970 – it is 27 seconds short as of 2026.
Related calculators
- Time Zone Converter
- Date Calculator
- Days Between Dates Calculator
- Time Calculator
- Week Number Calculator
Frequently Asked Questions
How do I convert a Unix timestamp to a date?
Divide the timestamp by 86,400 to get whole days since January 1, 1970, then convert the remainder to hours, minutes and seconds. The calculator does this instantly and shows the result in UTC, ISO 8601 and your local time.
Is a Unix timestamp in seconds or milliseconds?
Classic Unix time is in seconds (10 digits for current dates). JavaScript and many APIs use milliseconds (13 digits). The converter detects the unit from the size of the number.
Is Unix time always UTC?
Yes. A Unix timestamp counts seconds since 00:00:00 UTC on January 1, 1970 and has no time zone. Time zones only apply when the moment is displayed as a local date and time.
What is the Unix timestamp for January 1, 2026?
Midnight UTC on January 1, 2026 is 1767225600 seconds, or 1767225600000 milliseconds.
Can a Unix timestamp be negative?
Yes. Negative values represent moments before 1970; for example, −1000000000 is April 24, 1938, 22:13:20 UTC.