Unix Timestamp Converter
A timestamp into a readable date, or a date back into a timestamp, with seconds and milliseconds told apart for you. Nothing is uploaded.
How to use it
- Paste a timestamp on the left. Seconds or milliseconds — it works out which and says so.
- Or build a date on the right and read the timestamp back.
- Both panels are independent, so you can convert in each direction at the same time.
What the epoch actually is
A Unix timestamp counts the seconds since midnight UTC on 1 January 1970. That instant is called the epoch, and it was chosen because it was a convenient round date shortly before Unix was written.
The reason it is everywhere is that it carries no time zone and no daylight saving. It is one number that means the same instant everywhere on earth, which makes it safe to store, sort and subtract. The messy business of turning it into "Tuesday evening" happens once, at the last moment, in front of the person reading it.
Seconds or milliseconds
Count the digits. A timestamp in seconds for a date near today has ten; the same moment in milliseconds has thirteen. Unix, PHP and most databases use seconds; JavaScript and Java use milliseconds, which is where most of the confusion starts.
Getting it wrong is not subtle. Read a millisecond timestamp as seconds and your date lands around the year 55,000. This page checks the magnitude and tells you which it assumed, so you can catch it immediately.
The year 2038 problem
Older systems keep the timestamp in a signed 32-bit integer, which cannot go past 2,147,483,647. That number of seconds runs out at 03:14:07 UTC on 19 January 2038, and anything still using 32 bits will wrap around to December 1901.
Most things have moved to 64-bit, which pushes the limit far beyond the lifetime of the sun. This page is unaffected either way, because JavaScript uses a floating point number that comfortably covers dates a quarter of a million years out.
Frequently asked questions
What is a Unix timestamp?
The number of seconds that have passed since midnight UTC on 1 January 1970, a moment called the epoch. It is a single number with no time zone and no daylight saving in it, which is why almost every database and API stores time that way and converts to a readable date only at the last moment.
How do I tell seconds from milliseconds?
Count the digits. A timestamp in seconds for any date near today has ten digits; the same moment in milliseconds has thirteen. This page checks the size and tells you which it assumed, because reading milliseconds as seconds throws the answer about fifty thousand years into the future.
What is the year 2038 problem?
Older systems store the timestamp in a signed 32-bit integer, which runs out at 2,147,483,647 seconds. That moment arrives at 03:14:07 UTC on 19 January 2038, and a system that has not moved to 64-bit will wrap round to December 1901. This page uses JavaScript numbers, which are not affected.
Is anything I type sent anywhere?
No. The conversion happens in JavaScript inside your own browser. Nothing is uploaded and nothing is saved - close the tab and it is gone.