Unix timestamp converter
Convert epoch time to a readable date, or a date to epoch time. Seconds, milliseconds, microseconds and nanoseconds are detected automatically.
This tool runs in your browser. We never send what you type or paste to a server.
How to use it
- Epoch to date: paste a timestamp on the left. The unit is worked out from its size (10 digits is seconds, 13 milliseconds, 16 microseconds, 19 nanoseconds), and you get the date in UTC, in your own time zone and as ISO 8601. Negative values, for dates before 1970, and values with a decimal fraction work too.
- Date to epoch: type or paste a date on the right. It reads ISO 8601 (
2023-11-14T22:13:20Z,2023-11-14 22:13), email and HTTP dates (Tue, 14 Nov 2023 22:13:20 GMT), month-name dates (14 Nov 2023 10:13 PM) and the wordnow. - Time zones: a date that ends in
Z,UTC,GMTor an offset such as+05:30is read exactly as written. For a date with no zone, choose whether it means your local time or UTC.
Dates written only in numbers with slashes, such as 03/04/2024, are refused rather than guessed, because they mean 3 April in most of the world and 4 March in the United States.
Timecode to date, or to seconds
"Timecode" is used for two different things. If you have a long number such as 1700000000 from a log, a database or an API, it is a Unix timestamp: paste it on the left to get the date.
A video or SMPTE timecode looks like 01:02:03:12, meaning hours, minutes, seconds and frames from the start of a recording. It contains no date, so it cannot be turned into one; what you can get is a duration, and only if you know the frame rate:
seconds = hours × 3600 + minutes × 60 + seconds + frames ÷ frame rate
01:02:03:12 at 25 fps = 3600 + 120 + 3 + 12 ÷ 25 = 3723.48 secondsThat is exact for whole frame rates (24, 25, 30, 50, 60). At 29.97 and 59.94 fps the timecode either drifts from real time or, in drop-frame form (written with a semicolon, 01:02:03;12), skips frame numbers to stay close to it, so use your editing software's own conversion there. If the recording's start time is known, add the seconds to its timestamp to get the real time of a frame.
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.
Example
1700000000 seconds 2023-11-14 22:13:20 UTC
1700000000000 milliseconds same moment
1700000000000000 microseconds same moment
1700000000000000000 nanoseconds same moment
The unit is worked out from the number of digits, so you can paste values from JavaScript (Date.now(), milliseconds), Python (time.time(), seconds) or Go (UnixNano()) without converting first.
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.
What is the year 2038 problem?
Systems that store Unix time as a signed 32-bit number run out at 03:14:07 UTC on 19 January 2038. Anything using 64-bit time, which includes JavaScript and modern databases, is not affected.