Unix Timestamp Converter
Convert a Unix timestamp in seconds or milliseconds to a date in any time zone, and back.
Current Unix time
—
A Unix timestamp counts seconds since 1 January 1970 UTC. It is an instant, with no time zone of its own, which is why the same number is a different wall-clock time in Paris and in Tokyo. Pick the zone you care about and the conversion goes both ways.
How it works
Timestamps of thirteen digits or more are read as milliseconds, which is what JavaScript, Java and most log formats emit; shorter ones are read as seconds. Set the unit explicitly if you would rather not rely on that.
Going the other way, the date is interpreted in the time zone you chose unless the text states its own offset, in which case that offset wins. Relative expressions such as "now" or "+1 day" are refused: a result that changes between two loads of the same link is not a result you can share.
Daylight saving is applied from the current time zone database, so an instant in July and an instant in January in the same zone can have different offsets.
Examples
| Case | Input | Result |
|---|---|---|
| A timestamp in seconds, read in UTC | 1767225600 | 2026-01-01T00:00:00Z |
| The same instant in milliseconds | 1767225600000 | 2026-01-01T00:00:00Z |
Frequently asked questions
Seconds or milliseconds?
PHP, Python, Go and the date command work in seconds; JavaScript, Java and most JSON APIs work in milliseconds. A ten digit number today is seconds, a thirteen digit one is milliseconds.
Why does my date come out an hour off?
Almost always a time zone that was assumed rather than stated. A timestamp has no zone; the zone is chosen when it is displayed. Compare the UTC line with the local line to see the offset being applied.
What is the year 2038 problem?
A signed 32 bit timestamp overflows on 19 January 2038. Modern systems, this one included, use 64 bit integers and are unaffected, but embedded devices and old database columns are not.
Do timestamps count leap seconds?
No. Unix time pretends every day is exactly 86400 seconds, so a leap second is absorbed rather than counted. That is why it is an excellent identifier for an instant and a poor basis for measuring elapsed physical time across one.
Good to know
- Time zone rules come from the IANA database shipped with the server, so a zone whose rules changed after that release may be off by an offset until it is updated.