How to convert a Unix timestamp
- Paste one or more timestamps into the box, one per line. Seconds, milliseconds, microseconds and nanoseconds all work, and so do negative values and decimals.
- Leave the unit on Detect from the size of the number, or pick one if you know it. The table says which unit it used and why.
- Choose a time zone. Your own is preselected, and every IANA zone is in the list.
- To go the other way, type a date such as
2026-03-29 14:30:00under Date to timestamp. An offset like+02:00orZat the end overrides the zone.
Seconds, milliseconds, microseconds, nanoseconds
A Unix timestamp counts time since 1 January 1970 00:00:00 UTC, and the unit depends on who wrote it. Unix shells, PHP and most databases use seconds. JavaScript, Java and Kotlin use milliseconds. Python's time module can give microseconds, and Go, Rust and Prometheus hand out nanoseconds.
| Unit | Typical size today | Where you meet it |
|---|---|---|
| Seconds | 10 digits — 1700000000 | Unix, PHP, JWT exp, cron |
| Milliseconds | 13 digits — 1700000000000 | JavaScript, Java, Kafka, MongoDB |
| Microseconds | 16 digits | Python, PostgreSQL, tracing tools |
| Nanoseconds | 19 digits | Go, Rust, InfluxDB, Prometheus |
The page decides by the size of the number rather than by counting digits, because a digit count gets small and negative values wrong. A value below 100 billion is read as seconds, below 100 trillion as milliseconds, and so on up. When the result lands in an odd year — before 1990 or after 2100 — and another unit would put it in 2000-2100, the row says so. Pasting a millisecond value while Seconds is selected is by far the most common mistake, and it produces a date around the year 55,000.
Nanoseconds keep their last digits
JavaScript's Date object stores milliseconds, and a plain number cannot hold every digit
of a 19-digit nanosecond value — past 9,007,199,254,740,991 the last digits change.
A converter built on those two things quietly rounds. This one reads the value as an exact
integer, so 1700000000123456789 comes back as
2023-11-14T22:13:20.123456789Z with all nine fractional digits, not
.123Z.
Two local times that go wrong every year
Converting a date to a timestamp is easy in UTC and treacherous in a zone with daylight saving time, because two things happen every year:
- The skipped hour. When clocks jump forward, a range of local times
never occurs.
2026-03-08 02:30inAmerica/New_Yorkdoes not exist, because 02:00 became 03:00. Most libraries shift it forward without a word. - The repeated hour. When clocks fall back, a range of local times
happens twice.
2026-11-01 01:30inAmerica/New_Yorkis 05:30 UTC the first time and 06:30 UTC the second — an hour apart, same wall clock.
This page detects both. For a skipped time it explains what happened and shows the value you get either way. For a repeated time it gives both timestamps and tells you to add an offset to say which one you mean.
The year 2038 limit
A signed 32-bit integer tops out at 2,147,483,647 seconds, which is
2038-01-19 03:14:07 UTC. One second later it wraps to a negative number,
back to December 1901. Systems that still store time in 32 bits — old embedded
firmware, some file formats and database columns — break on that date. Any seconds
value above 2,147,483,647 is flagged in the results so you can see which of your values a
32-bit field could not hold.
What a timestamp does not contain
A Unix timestamp has no time zone. It names one moment, and the same number is 22:13 in London and 17:13 in New York. The zone only decides how that moment is written down, which is why the table shows UTC beside your chosen zone with the offset in force at that moment — not today's offset. It also does not count leap seconds: each day is exactly 86,400 seconds, so the timestamp of a leap second repeats the one before it.
Related tools
Need to count what is inside a text file rather than convert it? Try the word counter, or compare two exports line by line with text diff. Everything runs in your browser; nothing you paste is sent anywhere.