A Unix timestamp converter turns an epoch time, such as 1767225600, into a readable date and time, and turns a date back into a Unix timestamp. Paste a timestamp in seconds or milliseconds, or pick a date and time, and this free Unix timestamp converter shows the result in UTC, in ISO 8601, in your local time zone and as a relative time like "3 days ago". The current Unix time ticks at the top of the page, ready to copy.
What is a Unix timestamp?
Unix time is a way of representing a moment as a single number: the count of non-leap seconds that have passed since 00:00:00 UTC on Thursday, 1 January 1970, a moment known as the Unix epoch. Unix time 0 is exactly midnight UTC on that day, and the number goes up by one every second. For example, 00:00:00 UTC on 1 January 1971 is 31536000, and midnight UTC on 1 January 2010 was 1262304000. Times before 1970 are negative numbers. Because the definition is fixed to UTC, a Unix timestamp means the same instant everywhere in the world, which is why it is widely used in computing, operating systems, programming languages, databases and APIs. It is often called epoch time.
How to use the Unix timestamp converter
- Timestamp to date: paste the number into the Timestamp box. The converter reads it as seconds or milliseconds automatically, or you can choose the unit.
- Date to timestamp: switch the mode, pick a date and time, and say whether that time is in your local time zone or in UTC.
- Press Convert to see the date or timestamp at the top, with every other format in the table below.
- Use Now to load the current Unix time, then copy it with one click.
Seconds or milliseconds?
Unix time is counted in seconds, but many systems store it with more precision. JavaScript, Java and many web APIs use milliseconds, so the same moment has three more digits: 1767225600 seconds is 1767225600000 milliseconds. Some databases go further and store microseconds or nanoseconds. On Auto, this converter treats any number of 100,000,000,000 or more as milliseconds, because as seconds it would be thousands of years in the future, while as milliseconds it is a date after 1973. If your number is ambiguous, choose the unit yourself.
Unix timestamp examples
- 0 → 1970-01-01T00:00:00Z, the Unix epoch.
- 31536000 → 1971-01-01T00:00:00Z, exactly 365 days later.
- 1262304000 → 2010-01-01T00:00:00Z.
- 1767225600 → 2026-01-01T00:00:00Z.
- 2147483647 → 2038-01-19T03:14:07Z, the largest value a signed 32-bit number can hold.
How to convert a Unix timestamp by hand
Every day in Unix time has exactly 86,400 seconds. So to turn a timestamp into a date, divide by 86,400: the whole number is the count of days since 1 January 1970, and the remainder is the seconds into that day. To go back, count the days from the epoch to your date, multiply by 86,400 and add the seconds since midnight UTC. Leap years make counting days by hand error-prone, which is why most people use a converter, or a function such as date on the command line, new Date(seconds * 1000) in JavaScript or datetime.fromtimestamp in Python.
The year 2038 problem
On many platforms the type that holds Unix time was traditionally a signed 32-bit integer. That covers about 68 years either side of 1970, from 13 December 1901 to 19 January 2038. One second after 2038-01-19T03:14:07Z, a 32-bit counter overflows, an issue known as the year 2038 problem. Newer operating systems have widened the type to 64 bits, which can represent hundreds of billions of years, but older embedded systems and file formats may still be affected.
Time zones and Unix time
A Unix timestamp has no time zone of its own: it always counts from midnight UTC. Time zones only matter when you turn it into a clock time for people to read. The converter shows the UTC time and your browser's local time side by side. When you convert a date to a timestamp, make sure you choose whether the date you entered is local time or UTC; picking the wrong one shifts the answer by your offset from UTC.
Why developers use Unix timestamps
A single number is easy to store, sort and compare. Working out how long ago something happened is a subtraction, and two timestamps from servers in different countries can be compared directly without worrying about local clocks or daylight saving changes. That is why log files, databases, file systems, authentication tokens and APIs so often record times as Unix timestamps. The catch is that people can't read them at a glance, so a converter like this one is a quick way to check what moment a value in a log or a response really means, or to produce a timestamp to put in a test.
Leap seconds
Unix time ignores leap seconds: every Unix day is exactly 86,400 seconds long. That keeps the arithmetic simple and is one reason the format is so widely used for storing and comparing times.
Related time tools
Convert between time zones with the time zone converter, find the gap between two dates with the date difference calculator, and switch between 12-hour and 24-hour time with the military time converter.
What next
Use this often? Add Unix Timesta to your Home screen.
Frequently asked questions
How does the Unix timestamp converter work?
It counts seconds from the Unix epoch, 00:00:00 UTC on 1 January 1970, to turn a timestamp into a date, or a date into a timestamp.
What is the Unix epoch?
00:00:00 UTC on Thursday, 1 January 1970. Unix time 0 is that exact moment.
Is my timestamp in seconds or milliseconds?
A current timestamp in seconds has 10 digits; in milliseconds it has 13. The converter detects this automatically.
What is the year 2038 problem?
A signed 32-bit Unix time overflows one second after 2038-01-19T03:14:07Z. Systems that use 64-bit time are not affected.
Does a Unix timestamp have a time zone?
No. It always counts from midnight UTC, so it is the same everywhere. Time zones only matter when you show it as a clock time.
Sources
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.