# Unix Timestamp Converter

A Unix timestamp is the number of seconds since 00:00:00 UTC on January 1, 1970. The timestamp 1700000000 is Tuesday, November 14, 2023 at 22:13:20 UTC, or 2023-11-14T22:13:20Z. A 13-digit number is usually milliseconds, 16 digits microseconds and 19 digits nanoseconds: the converter works out which from the size, says what it picked, and lets you override it. Paste a timestamp below to see it in UTC and your own time zone, or pick a date, a time and a zone to get the timestamp.

Canonical page: https://ponderloop.com/tools/unix-timestamp-converter/
Updated: 2026-10-03

## How to use

How to convert a Unix timestamp to a date

1. **Paste the timestamp**: Type or paste the number, for example 1700000000. Spaces around it, a minus sign for dates before 1970 and a decimal point for fractions of a second are fine.
2. **Check the unit**: The converter reports whether it read the number as seconds, milliseconds, microseconds or nanoseconds. If the date looks wrong, choose the unit yourself.
3. **Read the date**: The results give the moment in UTC, in your own time zone, as ISO 8601 and RFC 2822, as the day of the week and relative to now. Copy any of them.
4. **Or go the other way**: In the date form, pick a date and a time, choose UTC, your zone or any city or IANA zone, and read off the timestamp in seconds, milliseconds, microseconds and nanoseconds.

## Reference tables and worked examples

### Notable Unix timestamps

Each date is the timestamp converted by this tool, in UTC.

| Timestamp (seconds) | UTC date and time | What it is |
| --- | --- | --- |
| -2147483648 | 1901-12-13 20:45:52 UTC | Smallest 32-bit signed value: the earliest date a signed 32-bit time_t can hold |
| -86400 | 1969-12-31 00:00:00 UTC | One day before the epoch |
| 0 | 1970-01-01 00:00:00 UTC | The Unix epoch |
| 946684800 | 2000-01-01 00:00:00 UTC | The year 2000 (Y2K) |
| 1000000000 | 2001-09-09 01:46:40 UTC | One billion seconds |
| 1234567890 | 2009-02-13 23:31:30 UTC | The sequence 1234567890 |
| 1700000000 | 2023-11-14 22:13:20 UTC | The example above: 1.7 billion seconds |
| 2000000000 | 2033-05-18 03:33:20 UTC | Two billion seconds |
| 2147483647 | 2038-01-19 03:14:07 UTC | Largest 32-bit signed value: the Year 2038 problem |
| 4294967295 | 2106-02-07 06:28:15 UTC | Largest 32-bit unsigned value: the limit of an unsigned time_t |

### Seconds, milliseconds, microseconds, nanoseconds

The same moment, 2023-11-14 22:13:20 UTC, in each unit. The converter picks the unit from the size of the whole number (the part before any decimal point) and you can override it. Seconds cover 1970 to the year 5138; milliseconds, microseconds and nanoseconds each start at 1973, where their numbers first reach 100,000,000,000, so any date from March 1973 to the year 5138 is read as intended.

| Unit | Example | Detected when the absolute value is | Dates covered (positive values) |
| --- | --- | --- | --- |
| seconds | 10 digits: 1700000000 | less than 100,000,000,000 | 1970-01-01 to 5138-11-16 |
| milliseconds | 13 digits: 1700000000000 | less than 100,000,000,000,000 | 1973-03-03 to 5138-11-16 |
| microseconds | 16 digits: 1700000000000000 | less than 100,000,000,000,000,000 | 1973-03-03 to 5138-11-16 |
| nanoseconds | 19 digits: 1700000000000000000 | at least 100,000,000,000,000,000 | 1973-03-03 to the year 275,760 |

### Get the current Unix timestamp in code

One-liners for the current time in seconds and in milliseconds. macOS and BSD date have no %N, so use Python or JavaScript there for milliseconds. SQL Server needs DATEDIFF_BIG (2016 and later) because plain DATEDIFF overflows past January 2038.

| Language | Seconds | Milliseconds |
| --- | --- | --- |
| JavaScript | Math.floor(Date.now() / 1000) | Date.now() |
| Python | import time; int(time.time()) | time.time_ns() // 1_000_000 |
| Bash (Linux, GNU date) | date +%s | date +%s%3N |
| PostgreSQL | SELECT extract(epoch FROM now())::bigint; | SELECT (extract(epoch FROM clock_timestamp()) * 1000)::bigint; |
| MySQL | SELECT UNIX_TIMESTAMP(); | SELECT ROUND(UNIX_TIMESTAMP(NOW(3)) * 1000); |
| SQLite | SELECT strftime('%s', 'now'); | SELECT CAST((julianday('now') - 2440587.5) * 86400000 AS INTEGER); |
| SQL Server | SELECT DATEDIFF_BIG(SECOND, '1970-01-01', SYSUTCDATETIME()); | SELECT DATEDIFF_BIG(MILLISECOND, '1970-01-01', SYSUTCDATETIME()); |

### Convert the timestamp 1700000000 to a date in code

Results are for UTC. The Python line needs from datetime import datetime, timezone. MySQL’s FROM_UNIXTIME uses the session time zone, so it matches only when that is UTC.

| Language | Code | Result |
| --- | --- | --- |
| JavaScript | new Date(1700000000 * 1000).toISOString() | 2023-11-14T22:13:20.000Z |
| Python | datetime.fromtimestamp(1700000000, tz=timezone.utc).isoformat() | 2023-11-14T22:13:20+00:00 |
| Bash (Linux, GNU date) | date -u -d @1700000000 | Tue Nov 14 22:13:20 UTC 2023 |
| Bash (macOS, BSD date) | date -u -r 1700000000 | Tue Nov 14 22:13:20 UTC 2023 |
| PostgreSQL | SELECT to_timestamp(1700000000) AT TIME ZONE 'UTC'; | 2023-11-14 22:13:20 |
| MySQL | SELECT FROM_UNIXTIME(1700000000); | 2023-11-14 22:13:20 |
| SQLite | SELECT datetime(1700000000, 'unixepoch'); | 2023-11-14 22:13:20 |

### Seconds in common periods

Unix time counts every day as exactly 86,400 seconds, so adding these to a timestamp moves it by that many days, weeks or hours (leap seconds are not counted).

| Period | Seconds |
| --- | --- |
| 1 minute | 60 |
| 1 hour | 3,600 |
| 1 day | 86,400 |
| 1 week | 604,800 |
| 30 days | 2,592,000 |
| 365 days | 31,536,000 |

## How it works

A timestamp is read as an exact number of seconds, milliseconds, microseconds or nanoseconds since 1970-01-01 00:00:00 UTC, using integers wide enough that a 19-digit nanosecond value keeps every digit. With the unit on automatic, the size of the whole part picks it (below 1e11 seconds, below 1e14 milliseconds, below 1e17 microseconds, otherwise nanoseconds). The result is split into whole milliseconds, which a JavaScript Date can hold within ±8.64e15, and the nanoseconds left inside that millisecond; the calendar fields come from the UTC calendar, which has no daylight saving, and the local view applies the offset your browser’s IANA time zone database gives for that instant. Relative times use your device’s clock and round down to whole units, with months and years at their average length. The counter at the top reads that same clock once a second. For the reverse direction a date and clock time are resolved in the zone you chose: a time skipped by a spring-forward change is moved forward by the gap and a repeated time uses its first occurrence unless you pick the second. Leap seconds are not counted, as in POSIX. The static example on this page is fixed, so it looks the same whenever it is built.

## FAQ

### What is a Unix timestamp?

A Unix timestamp (also called epoch time or POSIX time) is a count of the seconds that have passed since the Unix epoch, 00:00:00 UTC on January 1, 1970. It has no time zone: 1700000000 means the same instant everywhere and only its display changes (2023-11-14 22:13:20 UTC, or the evening of the same day in New York). Times before the epoch are negative: -86400 is 1969-12-31 00:00:00 UTC.

### How can I tell seconds from milliseconds, microseconds and nanoseconds?

By the number of digits. Timestamps for dates in the 2000s and 2020s have 10 digits in seconds, 13 in milliseconds (JavaScript, Java), 16 in microseconds (Python’s time.time() times a million, many databases) and 19 in nanoseconds (Go, some logging systems). The converter treats a whole part under 100,000,000,000 as seconds, under 100,000,000,000,000 as milliseconds, under 100,000,000,000,000,000 as microseconds and anything larger as nanoseconds. A millisecond timestamp from before March 1973 has fewer than 12 digits and looks like seconds, so choose the unit by hand for those.

### How do I get the current Unix timestamp in JavaScript, Python, bash or SQL?

JavaScript: Math.floor(Date.now() / 1000) for seconds, Date.now() for milliseconds. Python: int(time.time()) after import time. Bash on Linux: date +%s. PostgreSQL: SELECT extract(epoch FROM now())::bigint; MySQL: SELECT UNIX_TIMESTAMP(); SQLite: SELECT strftime('%s', 'now'); SQL Server: SELECT DATEDIFF_BIG(SECOND, '1970-01-01', SYSUTCDATETIME()); The tables above also give milliseconds and the reverse conversion. The live counter at the top of the tool shows the current value.

### What is the Year 2038 problem?

Systems that store Unix time in a signed 32-bit integer run out at 2147483647, which is 2038-01-19 03:14:07 UTC. One second later the value wraps around to -2147483648, which reads as 1901-12-13 20:45:52 UTC. Systems using a 64-bit integer, which is almost everything modern, are fine for hundreds of billions of years. An unsigned 32-bit value lasts until 4294967295, 2106-02-07 06:28:15 UTC.

### Does a Unix timestamp include leap seconds?

No. Unix time pretends every day has exactly 86,400 seconds, so it repeats or smears a second around a leap second rather than counting it. For dates and times in normal use this makes no difference, and it means a timestamp can be turned into a date with plain arithmetic. It is also why differences between two timestamps are off by a few seconds from the true elapsed time across past leap seconds.

### Can I use a decimal or negative timestamp?

Yes. A decimal such as 1700000000.5 is read as fractions of the chosen unit, down to the nanosecond, and shows in the ISO result as 22:13:20.5. A negative number is a moment before 1970. The limit is the range browsers can hold, plus or minus 8,640,000,000,000,000 milliseconds, which is the years −271,821 to 275,760; anything beyond is reported as out of range.

### How do I convert a date to a timestamp in a particular time zone?

Use the date form: pick the date and time, then type UTC, “local” for your own zone or any city or IANA zone such as America/New_York. Midnight on January 1, 2026 is 1767243600 in New York and 1767225600 in UTC; the difference is the 5-hour offset, 18,000 seconds.

### What happens with a time that does not exist because of daylight saving time?

On the spring-forward night the clock skips an hour: in New York on March 8, 2026 it jumps from 1:59 AM to 3:00 AM, so 2:30 AM never happens. The converter moves such a time forward by the length of the gap, so 2:30 AM there is read as 3:30 AM, giving 1772955000, and it tells you so. When the clocks go back, one hour happens twice: the converter uses the first one and offers a checkbox to take the second. JavaScript, Python’s zoneinfo and most calendars handle both cases the same way.

### Does the converter send my timestamps anywhere?

No. Everything runs in your browser, using its own time zone database, and nothing you type is sent or stored. The page counts only that the tool was used, never the values.

## Sources

- [POSIX: Seconds Since the Epoch, The Open Group](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16)
- [Time values and time range, ECMAScript language specification](https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-time-values-and-time-range)
- [RFC 3339: Date and Time on the Internet (the ISO 8601 profile)](https://datatracker.ietf.org/doc/html/rfc3339)
- [RFC 5322: Internet Message Format (date and time, formerly RFC 2822)](https://datatracker.ietf.org/doc/html/rfc5322#section-3.3)
- [Time Zone Database (tz), IANA](https://www.iana.org/time-zones)

---

Cite as: Unix Timestamp Converter, ponderloop, https://ponderloop.com/tools/unix-timestamp-converter/, updated 2026-10-03
