Unix Timestamp Converter
Convert Unix timestamps in seconds, milliseconds, microseconds or nanoseconds to dates, and dates back to timestamps.
Converts a Unix timestamp to a date โ in UTC, in your time zone and in any other โ and a date back to timestamps in seconds, milliseconds, microseconds and nanoseconds. It reads the unit from the number's length, keeps nanoseconds exact, and converts a pasted list at once.
How timestamps are read
A Unix timestamp counts seconds since 00:00:00 UTC on 1 January 1970, the Unix epoch; earlier instants are negative. POSIX defines it without leap seconds: every day is exactly 86,400 seconds, so a timestamp maps to a date by arithmetic alone. Timestamps are the same everywhere; only the date and time shown for one depends on the time zone.
Systems store timestamps in different units, and the digits give them away. Auto reads up to 11 digits as seconds, 12 to 14 as milliseconds, 15 to 17 as microseconds and 18 or more as nanoseconds, counting the digits without a minus sign; the result says which it chose, and the unit can be set by hand. A decimal fraction is kept, to the nanosecond.
Dates are read only in RFC 3339 form โ a date, a time and an offset, such as 2025-01-01T05:30:00+05:30 or 2025-01-01T00:00:00Z. Browsers disagree on what other forms mean, so they are rejected rather than guessed. Instants must lie within 8.64 ร 10ยนโต milliseconds of the epoch, the range JavaScript dates cover (years โ271,821 to 275,760).
Examples
A timestamp in seconds
- Input
- 1735689600
- Read as
- seconds
- UTC
- 2025-01-01T00:00:00Z
- India
- 2025-01-01T05:30:00+05:30
- New York
- 2024-12-31T19:00:00-05:00
The same instant is midnight in London and already morning in India, while New York is still on the evening before.
Milliseconds from JavaScript
- Input
- 1735689600123
- Read as
- milliseconds
- UTC
- 2025-01-01T00:00:00.123Z
Date.now() gives milliseconds, 13 digits for any date between 2001 and 2286.
Before 1970
- Input
- -1
- UTC
- 1969-12-31T23:59:59Z
One second before the epoch.
Notable timestamps
| Timestamp | UTC | Note |
|---|---|---|
| 0 | 1970-01-01T00:00:00Z | The epoch |
| 1000000000 | 2001-09-09T01:46:40Z | The first 10-digit timestamp |
| 1234567890 | 2009-02-13T23:31:30Z | The digits 1 to 0 in order |
| 2000000000 | 2033-05-18T03:33:20Z | Two billion seconds |
| 2147483647 | 2038-01-19T03:14:07Z | The largest signed 32-bit value: where 32-bit clocks overflow |
| 4294967295 | 2106-02-07T06:28:15Z | The largest unsigned 32-bit value |
Frequently asked questions
- JavaScript
- Math.floor(Date.now() / 1000)
- Python
- import time; int(time.time())
- PostgreSQL
- SELECT EXTRACT(EPOCH FROM now())::bigint;
- MySQL
- SELECT UNIX_TIMESTAMP();
- Shell (Linux, macOS)
- date +%s
1970-01-21T02:08:09.6Z. The other way round, a millisecond value read as seconds lands tens of thousands of years ahead. Auto picks the unit by the number of digits, so check the unit the result names.See also
- JWT Decoder โ to read a token's exp and iat claims, which are Unix timestamps.
- Days Between Dates โ to count the days between two dates.
- Time Zone Converter โ to line up a time across several cities, hour by hour.