Timestamp Converter
Convert Unix epoch timestamps to dates and back. Detects seconds, ms, ยตs and ns; shows UTC, local and any time zone in ISO 8601 and RFC 2822.
Timestamp โ date
Date โ timestamp
The current Unix time ticks at the top. Paste any timestamp to see it as a date in UTC, in your own time zone and in any other zone, in ISO 8601, RFC 2822 and plain English. The converter works out whether the number is in seconds, milliseconds, microseconds or nanoseconds, and you can override its guess. Below that, turn a date and time in any zone back into a timestamp. Everything is calculated in your browser.
What a Unix timestamp is
Unix time counts the seconds since the Unix epoch, midnight UTC on January 1, 1970 (1970-01-01T00:00:00Z). The count is the same everywhere on Earth at a given moment, so a timestamp has no time zone; zones only matter when you turn it into a calendar date and clock time. Unix time treats every day as exactly 86,400 seconds, which makes the conversion simple arithmetic:
seconds into that day = timestamp mod 86,400
Worked example: 1,700,000,000
- 1,700,000,000 รท 86,400 = 19,675 whole days, with 80,000 seconds left over.
- 19,675 days after January 1, 1970 is November 14, 2023.
- 80,000 seconds is 22 hours (79,200 s), 13 minutes (780 s) and 20 seconds.
So 1,700,000,000 is 2023-11-14T22:13:20Z, or Tue, 14 Nov 2023 22:13:20 +0000 in RFC 2822 form. In milliseconds the same moment is 1,700,000,000,000. Times before 1970 are negative: โ1 is 1969-12-31T23:59:59Z, and January 1, 1900 is โ2,208,988,800.
Seconds, milliseconds, microseconds or nanoseconds?
Systems disagree on the unit. For dates in this era, the number of digits gives it away: every 10-digit count of seconds falls between 2001-09-09T01:46:40Z and 2286-11-20T17:46:39Z, and the same span holds for 13 digits of milliseconds, 16 of microseconds and 19 of nanoseconds.
| Unit | Digits (recent dates) | Example for the same moment | Auto-detect range |
|---|---|---|---|
| Seconds | 10 | 1700000000 | below 100,000,000,000 |
| Milliseconds | 13 | 1700000000000 | below 100,000,000,000,000 |
| Microseconds | 16 | 1700000000000000 | below 100,000,000,000,000,000 |
| Nanoseconds | 19 | 1700000000000000000 | anything larger |
The auto-detect reads any value below 100,000,000,000 as seconds, which covers dates up to 5138-11-16T09:46:40Z. The trade-off is that a millisecond value from before 1973-03-03T09:46:40Z is small enough to look like seconds, so choose the unit by hand for those. The table shows what common platforms return:
| Platform | Call | Unit |
|---|---|---|
| JavaScript | Date.now() | milliseconds (integer) |
| Java | System.currentTimeMillis() | milliseconds |
| Python | time.time() / time.time_ns() | seconds (float) / nanoseconds (int) |
| PHP | time() / microtime(true) | seconds (int) / seconds (float) |
| Go | time.Now().Unix() / UnixMilli() / UnixNano() | seconds / milliseconds / nanoseconds |
| C, POSIX | time(NULL) | seconds (time_t) |
| .NET | DateTimeOffset.UtcNow.ToUnixTimeSeconds() | seconds (a Milliseconds version also exists) |
| MySQL | UNIX_TIMESTAMP() | seconds |
| Shell (GNU date) | date +%s | seconds |
JSON Web Tokens store exp and iat in seconds; the JWT decoder converts them for you. Mixing units is a classic bug: a seconds value read as milliseconds lands in January 1970, and a milliseconds value read as seconds lands tens of thousands of years in the future.
Notable timestamps
| Timestamp (s) | UTC (ISO 8601) | What it is |
|---|---|---|
| 0 | 1970-01-01T00:00:00Z | The Unix epoch |
| โ1 | 1969-12-31T23:59:59Z | One second before the epoch |
| 86,400 | 1970-01-02T00:00:00Z | One day (86,400 seconds) later |
| 1,000,000,000 | 2001-09-09T01:46:40Z | First 10-digit timestamp |
| 1,234,567,890 | 2009-02-13T23:31:30Z | Digits 1 to 0 in order |
| 1,700,000,000 | 2023-11-14T22:13:20Z | The worked example above |
| 2,000,000,000 | 2033-05-18T03:33:20Z | Two billion seconds |
| 2,147,483,647 | 2038-01-19T03:14:07Z | Largest signed 32-bit value (2ยณยน โ 1) |
| โ2,147,483,648 | 1901-12-13T20:45:52Z | Smallest signed 32-bit value (โ2ยณยน) |
| 4,294,967,295 | 2106-02-07T06:28:15Z | Largest unsigned 32-bit value (2ยณยฒ โ 1) |
| 9,999,999,999 | 2286-11-20T17:46:39Z | Last 10-digit timestamp |
| 253,402,300,799 | 9999-12-31T23:59:59Z | Last second of the year 9999 |
The Year 2038 problem
Older systems store Unix time in a signed 32-bit integer, which tops out at 2,147,483,647: January 19, 2038, 03:14:07 UTC. One second later the counter overflows and wraps to โ2,147,483,648, which reads as December 13, 1901, 20:45:52 UTC. Unsigned 32-bit counters last until 2106-02-07T06:28:15Z but cannot hold dates before 1970.
The fix is a 64-bit count, which modern operating systems, languages and databases use; a signed 64-bit count of seconds lasts about 292 billion years. The risk lives in older embedded devices, file formats and database columns with a 32-bit field. MySQL's TIMESTAMP type, for example, ends at 2038-01-19 03:14:07 UTC, so use DATETIME or a 64-bit integer for dates beyond it. To test code against the limit, enter 2147483647 and 2147483648 above.
Leap seconds and Unix time
UTC occasionally adds a leap second (27 were inserted between 1972 and the end of 2016), but Unix time ignores them: every day is 86,400 seconds, so the leap second itself has no timestamp of its own. 2016-12-31T23:59:60Z was a real second, yet 1,483,228,799 is 23:59:59 and 1,483,228,800 is 2017-01-01T00:00:00Z. Systems either repeat a second or "smear" the extra second over several hours. The practical effect is that subtracting two Unix timestamps can be off by the number of leap seconds between them, which matters mainly for precise timing work.
Time zones and daylight saving time
Converting a timestamp to a time zone is always unambiguous. The reverse is not, because daylight saving time skips some clock times and repeats others. In America/New_York in 2025, clocks jumped from 2:00 to 3:00 on March 9, so 2:30 that morning never happened; and on November 2 they fell back from 2:00 to 1:00, so 1:30 happened twice:
| Local time (New York) | Offset | Timestamp | UTC |
|---|---|---|---|
| Nov 2, 1:30 (first) | EDT, UTCโ4 | 1,762,061,400 | 2025-11-02T05:30:00Z |
| Nov 2, 1:30 (second) | EST, UTCโ5 | 1,762,065,000 | 2025-11-02T06:30:00Z |
| Mar 9, 2:30 (skipped) | moved to 3:30 EDT | 1,741,505,400 | 2025-03-09T07:30:00Z |
The date-to-timestamp converter follows the same rule as Python's zoneinfo with fold=0 and the default "compatible" option of JavaScript's Temporal API: a skipped time moves forward by the length of the gap, and a repeated time uses the first occurrence. It tells you when either case applies, with a button to switch to the second occurrence. Libraries do not all agree on this, so check yours if the result matters. To avoid the problem in your own data, store timestamps or UTC, and keep the IANA zone name (such as America/New_York) alongside local times rather than a fixed offset.
Getting and converting timestamps in code
// JavaScript
Math.floor(Date.now() / 1000) // current time, seconds
new Date(1700000000 * 1000).toISOString() // '2023-11-14T22:13:20.000Z'
# Python
import time, datetime
int(time.time())
datetime.datetime.fromtimestamp(1700000000, tz=datetime.timezone.utc)
// PHP
time();
gmdate('c', 1700000000); // '2023-11-14T22:13:20+00:00'
// Java
java.time.Instant.now().getEpochSecond();
java.time.Instant.ofEpochSecond(1700000000L);
-- SQL
SELECT UNIX_TIMESTAMP(); -- MySQL
SELECT FROM_UNIXTIME(1700000000); -- MySQL, in the session time zone
SELECT EXTRACT(EPOCH FROM now()); -- PostgreSQL
SELECT to_timestamp(1700000000); -- PostgreSQL
# Shell (GNU coreutils)
date +%s
date -u -d @1700000000 # Tue Nov 14 22:13:20 UTC 2023
To count the days between two dates, use the date calculator; for schedules, the cron expression builder; and for timestamps written in hex, convert them to decimal first with the number system converter.