Language: English

tools / timestamp

timestamp/

Convert between Unix timestamps (seconds / milliseconds) and dates, parsed in your local time zone.

Now
Timestamp (s)
Timestamp (ms)
Local time

Timestamp → Date

Date → Timestamp

What is a Unix timestamp

A Unix timestamp is the number of seconds elapsed since 1970-01-01 00:00:00 UTC; a millisecond timestamp is the same instant in seconds multiplied by 1000. This page reads numbers with 12 or more integer digits as milliseconds and fewer than 12 as seconds, and converts them to and from local time, UTC and ISO 8601.

How it works: seconds only, no time zone

A timestamp only records how many seconds have passed since the starting point and carries no time zone, so the same number means the same instant everywhere. When it is turned into a date, the "Local time" row uses the time zone your browser reports and the "UTC" row always uses zero offset.

The conversion uses the browser's Date. ECMA-262 defines it, like POSIX, as counting every day as exactly 86400 seconds with no leap seconds, so a leap second has no timestamp of its own.

Example

A 10-digit timestamp in seconds converted to UTC in ISO 8601 form; on a device set to UTC+8, the "Local time" row shows 2026-09-21 22:13:20.

Input
1790000000
Output
2026-09-21T14:13:20.000Z

A date ending in Z is read as UTC, and the .5 after the seconds is 500 milliseconds, so the millisecond timestamp ends in 500.

Input
2026-09-27T12:00:00.5Z
Output
1790510400500

Sources

FAQ

What's the difference between 10-digit and 13-digit timestamps? How do I tell seconds from milliseconds?

A 10-digit timestamp is in seconds and a 13-digit one is in milliseconds. The tool goes by digit count: 12 or more digits in the integer part is treated as milliseconds, fewer as seconds, and the result is shown next to the "Timestamp → Date" heading. It's only wrong for millisecond values before March 1973, which have fewer than 12 digits and are read as seconds.

The converted time is off by a few hours. What should I check?

Look at the time zone shown on the top row of the page. "Local time" uses your browser's current time zone, and the "UTC" row is the time at zero offset; a gap of a few hours usually means the two sides used different zones.

Which time zone is used when I don't specify one in Date → Timestamp?

Your browser's local time zone; the result is labeled "Parsed in your local time zone". A date without a time means midnight in your local time zone. That differs from JavaScript's new Date('2026-09-27'), which uses UTC, so the same date comes out one time zone apart. To fix the zone, append Z or an offset like +08:00.

Which date formats are supported? What if it says "Unrecognized date format"?

Put the year first. Use -, / or . between year, month and day; the time is optional and is separated from the date by a space or T, e.g. 2026-09-27 12:00:00, 2026/09/27 or 2026-09-27T12:00:00+08:00. Formats like 09/27/2026 (month/day/year) are handed to the browser and labeled "Parsed by the browser, please double-check"; the error appears only if the browser can't read it either. A plain number (including 20260927) is treated as a timestamp, and you're pointed to the box on the left.

How do I convert 16-digit or 19-digit timestamps (microseconds, nanoseconds)?

Only seconds and milliseconds are understood. A 16-digit microsecond value is read as milliseconds and gives a date tens of thousands of years away, and a 19-digit nanosecond value is rejected as out of range. Divide microseconds by 1000 or nanoseconds by 1000000 to get milliseconds, then enter that.

Can it convert timestamps after 2038 or before 1970?

Yes to both. For dates before 1970, enter a negative number with a minus sign. The tool uses JavaScript's Date and isn't limited to 32-bit integers, so there's no year-2038 problem. The range is about 270,000 years either side of 1970, and anything beyond that is rejected with a message.

Do JavaScript, Java, Python and Go return seconds or milliseconds?

JavaScript's Date.now() and Java's System.currentTimeMillis() return milliseconds (13 digits). Python's time.time() returns seconds with a fraction. Go's time.Now().Unix() is seconds, and you need UnixMilli() for milliseconds. PHP's time() is seconds. Seconds with a fraction can be entered as they are and are converted to milliseconds.

Why do I get an error for February 30 or 24:00:00?

The tool checks that the date actually exists: February 30 gives a "no such day" message instead of rolling over to March. The month must be 1–12 and the time 0–23 hours, 0–59 minutes and 0–59 seconds, so 24:00:00 and a leap second of 60 are rejected. Fractions of a second are kept to 3 digits, which is milliseconds.