Unix timestamp converter
Convert epoch time to a readable date and back. Seconds and milliseconds are detected automatically.
What is Unix time?
Unix time counts the seconds since 00:00:00 UTC on 1 January 1970 (the "epoch"), ignoring leap seconds. It's the same everywhere in the world at a given moment, which makes it ideal for storing times. JavaScript and many APIs use milliseconds instead; a 13-digit timestamp is almost certainly milliseconds.
The year 2038 problem
Systems that store Unix time as a signed 32-bit integer overflow at 03:14:07 UTC on 19 January 2038 (timestamp 2,147,483,647). Modern systems use 64-bit timestamps, which last for billions of years.
Questions
How do I get the current Unix timestamp?
It's shown live at the top of this page. In code: Math.floor(Date.now() / 1000) in JavaScript, time.time() in Python, date +%s in a shell.
Seconds or milliseconds?
10-digit timestamps are seconds; 13-digit timestamps are milliseconds. The converter detects which you've entered.