Unix Timestamp Converter
Convert a Unix timestamp to a readable date and back. This Unix timestamp converter detects seconds, milliseconds, microseconds and nanoseconds, and shows UTC, your local time, any time zone, ISO 8601, RFC 2822 and relative time.
| UTC | | |
|---|---|---|
| Selected time zone | | |
| Your local time | | |
| ISO 8601 (UTC) | | |
| ISO 8601 with offset | | |
| RFC 2822 | | |
| HTTP date | | |
| Relative | | |
| Day of week | | |
| Unix seconds | | |
| Milliseconds | | |
| Microseconds | | |
| Nanoseconds | | |
| Day of year | | |
| ISO week | |
ISO 8601 (2024-03-15T14:30:00Z), RFC 2822 (Fri, 15 Mar 2024 14:30:00 +0000) or 2024-03-15 14:30:00. Without an offset, the time is read in the time zone below.
| Unix seconds | | |
|---|---|---|
| Milliseconds | | |
| Microseconds | | |
| Nanoseconds | | |
| ISO 8601 (UTC) | | |
| ISO 8601 with offset | | |
| RFC 2822 | | |
| Relative | |
Convert Epoch Time to a Readable Date
Logs, databases, JWT tokens and APIs store moments in time as a plain number: the seconds (or milliseconds) since 1 January 1970 UTC. Paste that number into this Unix timestamp converter and it shows the exact date and time, in UTC, in your own time zone and in any other zone, with a live clock of the current timestamp at the top.
It also works the other way round: type a date, pick the time zone it belongs to and copy the timestamp in seconds, milliseconds, microseconds or nanoseconds. Large values are handled with exact integer math, and everything runs in your browser.
How to convert a Unix timestamp
- Paste the timestamp into the Unix timestamp box, or click Now. The unit is detected from the number of digits; choose it yourself if the guess is wrong.
- Pick a time zone to see the date in that zone next to UTC and your local time.
- Copy the format you need: ISO 8601 for APIs and JSON, RFC 2822 for email headers, the HTTP date for
ExpiresandLast-Modifiedheaders. - For the reverse, type a date in the right-hand panel, choose the zone it is in and copy the timestamp.
How Unix time works
Unix time counts the seconds since the Unix epoch, 1970-01-01 00:00:00 UTC. Every day is exactly 86,400 seconds, because leap seconds are ignored, so converting is simple arithmetic: divide by 86,400 to get the day number and use the remainder for the time of day.
For example, 1700000000 ÷ 86400 = 19675 with a remainder of 80,000 seconds. Day 19,675 after the epoch is 14 November 2023, and 80,000 seconds is 22 hours, 13 minutes and 20 seconds, so the timestamp is 2023-11-14T22:13:20Z.
A timestamp has no time zone: it marks the same instant everywhere. The zone only matters when you display it, which is why the same number reads 22:13 in London and 17:13 in New York. Negative numbers are dates before 1970.
Seconds, milliseconds, microseconds or nanoseconds?
| Unit | Digits today | Same instant | Typical sources |
|---|---|---|---|
| Seconds | 10 | 1700000000 | Unix date +%s, PHP time(), JWT exp and iat |
| Milliseconds | 13 | 1700000000000 | JavaScript Date.now(), Java System.currentTimeMillis() |
| Microseconds | 16 | 1700000000000000 | Go UnixMicro(), many tracing systems |
| Nanoseconds | 19 | 1700000000000000000 | Go UnixNano(), Python time.time_ns() |
Auto-detect treats values below 1011 as seconds, below 1014 as milliseconds, below 1017 as microseconds and anything larger as nanoseconds. That is right for any date between 1973 and 5138; for older dates, set the unit by hand.
Notable Unix timestamps
| Timestamp | Date and time (UTC) | Why it matters |
|---|---|---|
0 | 1970-01-01 00:00:00 | The Unix epoch |
1000000000 | 2001-09-09 01:46:40 | First 10-digit timestamp |
1234567890 | 2009-02-13 23:31:30 | A popular test value |
1700000000 | 2023-11-14 22:13:20 | Example used on this page |
2000000000 | 2033-05-18 03:33:20 | Two billion seconds |
2147483647 | 2038-01-19 03:14:07 | Largest signed 32-bit value (Year 2038 problem) |
-2147483648 | 1901-12-13 20:45:52 | Smallest signed 32-bit value |
4294967295 | 2106-02-07 06:28:15 | Largest unsigned 32-bit value |
9999999999 | 2286-11-20 17:46:39 | Last 10-digit timestamp |
Get the current timestamp in code
| Language | Current timestamp (seconds) | Timestamp to date |
|---|---|---|
| JavaScript | Math.floor(Date.now() / 1000) | new Date(ts * 1000) |
| Python | int(time.time()) | datetime.fromtimestamp(ts, timezone.utc) |
| PHP | time() | date(DATE_ATOM, $ts) |
| Go | time.Now().Unix() | time.Unix(ts, 0) |
| Java | Instant.now().getEpochSecond() | Instant.ofEpochSecond(ts) |
| PostgreSQL | extract(epoch from now()) | to_timestamp(ts) |
| MySQL | UNIX_TIMESTAMP() | FROM_UNIXTIME(ts) |
| Shell | date +%s | date -d @ts (GNU), date -r ts (macOS) |
Tips for working with timestamps
- A date in January 1970 usually means milliseconds were read as seconds, or the other way round. Check the digit count.
- Store UTC, display local. Keep timestamps or UTC ISO strings in your database and convert to the user's zone only when you show them.
- Mind the Year 2038 problem. Signed 32-bit integers overflow after
2147483647. Use 64-bit columns and types for new code. - Date-only strings are tricky. JavaScript reads
2024-03-15as UTC midnight but2024-03-15T00:00as local midnight. This tool reads both in the zone you choose. - Scheduling a job? Check its run times with the cron expression parser. Debugging a request? Inspect timing data in the HAR viewer and the expiry of cookies with the cookie parser.
Frequently Asked Questions
Common questions about Unix timestamps and epoch time.
It is the number of seconds that have passed since 1 January 1970 at 00:00:00 UTC, not counting leap seconds. It is also called epoch time or POSIX time.
Count the digits. Current dates have 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds. The converter detects this automatically.
No. A timestamp marks one instant that is the same everywhere. Only the displayed date and time change with the time zone.
On 19 January 2038 at 03:14:07 UTC, the timestamp passes 2,147,483,647, the largest value of a signed 32-bit integer. Systems that store it in 32 bits overflow to 1901; 64-bit systems are not affected.
Yes. Negative values count backwards from the epoch, so -86400 is 31 December 1969 at 00:00 UTC.
POSIX defines every day as exactly 86,400 seconds, which keeps date arithmetic simple. During a leap second the clock repeats or smears a second instead.
ISO 8601 looks like 2023-11-14T22:13:20Z and is used in JSON and APIs. RFC 2822 looks like Tue, 14 Nov 2023 22:13:20 +0000 and is used in email headers.
No. All conversions run in your browser with JavaScript, using exact integer math for large values.