- Home
- Tools
- Date & Time
- Unix Timestamp Converter
Unix Timestamp Converter
Turn an epoch timestamp into a readable date and back, in seconds or milliseconds.
Current Unix time
–
Timestamp to date
Read as seconds, because the number has 10 digits.
- Your time zone
…
- UTC
Tuesday, November 14, 2023, 22:13:20
- ISO 8601
2023-11-14T22:13:20.000Z
- Relative
…
Date to timestamp
- Seconds
–
- Milliseconds
–
What a Unix timestamp is
A Unix timestamp, also called epoch time or POSIX time, is the number of seconds that have passed since January 1, 1970 at 00:00:00 UTC. That moment is known as the Unix epoch. The timestamp 1700000000 is 1.7 billion seconds after it: November 14, 2023 at 22:13:20 UTC. Moments before 1970 are negative numbers, so -86400 is the start of December 31, 1969.
The count pretends that every day has exactly 86,400 seconds. The leap seconds that are occasionally added to UTC are not counted. That keeps the arithmetic simple: divide a timestamp by 86,400 and you get whole days since the epoch, with the time of day as the remainder.
Seconds, milliseconds or finer
The original timestamp counts seconds, but plenty of software counts smaller units from the same starting point. You can tell them apart by their length:
- Seconds, 10 digits today:
date +%s, PHPtime(), Pythontime.time() - Milliseconds, 13 digits: JavaScript
Date.now(), JavaSystem.currentTimeMillis() - Microseconds, 16 digits: Go
UnixMicro() - Nanoseconds, 19 digits: Go
UnixNano(), Pythontime.time_ns()
The converter guesses the unit from the number of digits: up to 11 digits are read as seconds, 12 to 14 as milliseconds, 15 to 17 as microseconds and anything longer as nanoseconds. It always says what it assumed.
The guess goes wrong for small values in a fine unit. 86400000 is one day in milliseconds, January 2, 1970, but with its 8 digits it is read as seconds and comes out as September 27, 1972. If a result looks off, pick the unit yourself.
A timestamp has no time zone
The epoch is defined in UTC, so a timestamp marks the same instant everywhere on Earth. A time zone only comes into it when the number is turned into a date for someone to read. 1700000000 is 22:13 in London, 23:13 in Amsterdam and 07:13 the next morning in Tokyo.
The other way round, a date and a time are not a timestamp until you say where the clock was. That is what the choice between local time and UTC is for: the same reading of the clock gives two numbers that differ by your offset from UTC.
Local time has two awkward hours a year in places with daylight saving time. When the clocks go forward an hour is skipped, and when they go back an hour happens twice. The converter tells you when the time you picked is one of those.
The year 2038 problem
Older software stores the timestamp in a signed 32-bit integer, which cannot hold a number larger than 2,147,483,647. That second falls on January 19, 2038 at 03:14:07 UTC. One second later such a counter wraps around to −2,147,483,648, which is December 13, 1901.
Systems that count in 64 bits are not affected. Their limit is about 292 billion years away.
This page has a limit of its own. A JavaScript date reaches 100 million days from the epoch in either direction, which is about 273,790 years.
More date & time
See all 9All tools