Unix Timestamp Converter
Both directions, with the unit worked out for you.
Convert a Unix timestamp to a readable date in any timezone, or a date back to seconds, milliseconds or nanoseconds, with the unit detected for you.
Date to timestamp
Landmarks
A Unix timestamp counts seconds since midnight UTC on 1 January 1970, and it carries no timezone: the number is the same everywhere, and only the way it is displayed differs. It also ignores leap seconds, which is deliberate — a day is defined as exactly 86,400 seconds, so the count stays simple at the cost of drifting from astronomical time by a handful of seconds since 1972. Nothing here is sent anywhere; the conversion happens in your browser.
How the Unix Timestamp Converter works
The conversion is one multiplication. What makes a timestamp tool useful is getting the unit right, because the same instant is written with ten, thirteen, sixteen or nineteen digits depending on what produced it, and feeding a millisecond value into a seconds parser gives a date in the year 57,000 without complaining.
Also known as: epoch converter · timestamp to date converter · epoch time converter · milliseconds to date · current unix timestamp
Frequently asked questions
What is a Unix timestamp?
A count of seconds since midnight UTC on 1 January 1970, which is called the epoch. It carries no timezone: the number is identical everywhere on earth and only its display differs, which is exactly why systems store it rather than a formatted date. The epoch was chosen in the early 1970s as a convenient recent round date, not for any deeper reason.
Is my timestamp in seconds or milliseconds?
Count the digits. For any date from 2001 to 2286, seconds have ten digits, milliseconds thirteen, microseconds sixteen and nanoseconds nineteen. Unix tools and most databases use seconds; JavaScript, Java and most JSON APIs use milliseconds; Go's monotonic clock and many tracing systems use nanoseconds. Getting it wrong by a factor of a thousand puts the date in 1970 or in the year 57,000, which is at least obvious once you look.
What is the year 2038 problem?
A signed 32-bit integer runs out at 2,147,483,647 seconds, which is 03:14:07 UTC on 19 January 2038. A system storing time that way wraps to negative and lands in December 1901. Most current software moved to 64 bits long ago, but embedded devices, old file formats and some database columns have not, and anything computing a date more than a decade ahead can hit it today rather than in 2038.
Do Unix timestamps include leap seconds?
No, and that is deliberate. A day is defined as exactly 86,400 seconds, so the count stays arithmetically simple at the cost of drifting from astronomical time by the 27 leap seconds inserted since 1972. When one occurs, systems typically repeat or smear a second rather than counting it. It means the difference between two timestamps is not quite the number of seconds that physically elapsed, which matters for almost nothing outside timekeeping itself.
Why does the same timestamp show a different time on my server?
Because the timestamp has no timezone and the display does. The number is the same instant everywhere; what differs is which zone it is being rendered in, and servers very often run in UTC while the people reading the output do not. The offset also depends on the date rather than on today, since daylight saving means New York is five hours behind London in January and four in July, and the two do not change over on the same weekend.
What is a negative timestamp?
A date before 1970. It is perfectly valid arithmetic and most systems handle it, but a surprising amount of software does not: date pickers that refuse it, databases that store the count as unsigned, and code that treats a negative as an error. It is worth testing if you deal with birth dates or historical records.
Related calculators
Cron Expression Generator
What it means in English, and the next eight times it will run.
OpenDate Difference Calculator
Days between two dates, with or without weekends.
OpenRegex Tester
Test a pattern, and read what it actually says in English.
Open