Free tool · no sign-up
Unix timestamp converter
A timestamp into a date you can read, in UTC and in your own time zone — and back again. Seconds, milliseconds, microseconds and nanoseconds, detected for you.
Paste the number out of a log line, a JSON payload, a JWT or a database column and read what moment it actually is: UTC, your own clock, ISO 8601, the day of the week, and how long ago that was.
The unit is detected from the size of the number and then stated plainly, so you can see the assumption the tool made and override it. That is the mistake worth guarding against: reading a millisecond timestamp as seconds puts the answer tens of thousands of years out, and reading seconds as milliseconds lands everything in January 1970.
What a Unix timestamp is
It is a count of seconds since midnight UTC on 1 January 1970, called the epoch. It carries no time zone and no daylight saving — it is one number for one instant everywhere on earth, which is exactly why machines store time this way and why two servers in different zones can agree about ordering without negotiating anything.
Leap seconds are the one wrinkle: Unix time pretends they do not exist, so it stays exactly 86,400 seconds per day and drifts from astronomical time by the handful of seconds that have been inserted since 1972. For anything short of satellite navigation this does not matter.
Seconds, milliseconds, microseconds, nanoseconds
Different systems write the same instant at different precisions, and the only way to tell them apart is the magnitude of the number. A present-day timestamp has about 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds.
- Seconds — Unix tools, `date +%s`, cron, most HTTP headers, JWT `exp` and `iat` claims, certificate validity.
- Milliseconds — JavaScript's Date.now(), Java, Kafka, most JSON APIs.
- Microseconds — Postgres internal timestamps, some tracing systems.
- Nanoseconds — Go's time.UnixNano, Prometheus and InfluxDB, Linux kernel tracing.
The two dates to know about
On 19 January 2038 a signed 32-bit seconds counter overflows and wraps to 1901. Any system still holding time in a 32-bit integer breaks then — which is now close enough that it shows up in embedded devices, old filesystem formats and database columns that were never widened. 64-bit time is good for roughly 292 billion years and is the fix.
The other one is 0. A date of 1970-01-01 00:00:00 UTC in your output is almost never a real date; it is a missing or zeroed field being formatted as though it were one. The same goes for 1969-12-31 — that is a small negative number, usually -1 used as an error code.
Common questions
How do I get the current Unix timestamp on Linux?
`date +%s` for seconds, `date +%s%3N` for milliseconds. To go the other way, `date -d @1760710740` reads one back, and `date -u -d @1760710740` prints it in UTC rather than the server's zone.
Is a Unix timestamp in UTC?
It is in neither zone and every zone: it counts seconds since a fixed instant, so it has no zone of its own. A zone only enters when you format it for a person to read, which is why this tool shows UTC and your local time side by side.
Why does my timestamp show as 1970 or 1901?
1970 means the value is zero or near it — usually an unset field. 1901 means a 32-bit signed counter has overflowed, the year-2038 problem arriving early because something added a span to a date near the limit.
How do I tell seconds from milliseconds?
Count the digits. A timestamp for today is 10 digits in seconds and 13 in milliseconds. If a date comes out in the far future, you read milliseconds as seconds; if it comes out in 1970, you read seconds as milliseconds.
What about dates before 1970?
They are negative numbers — -86400 is 31 December 1969. Many systems handle them correctly and some do not accept them at all, which is why historical dates are usually better stored as a date string than as an epoch.