Programming tool
Unix Timestamp Converter
Convert epoch time in seconds or milliseconds to a readable UTC, ISO 8601, or local date, or turn any date into a Unix timestamp.
The unit is explicit so values such as 1000 are never guessed.
Converted values
—————What is a Unix timestamp?
A Unix timestamp counts elapsed time from the Unix epoch: January 1, 1970 at 00:00:00 UTC. It gives software a compact, timezone-independent way to store and compare moments.
Seconds vs milliseconds
Traditional Unix time uses seconds, while JavaScript and many APIs use milliseconds. A millisecond timestamp is exactly 1,000 times its seconds equivalent.
UTC and local time
A timestamp identifies one instant. UTC shows that instant against the global reference clock; local time applies your browser's timezone and daylight-saving rules. When converting a typed date, choose the intended interpretation explicitly.
Negative timestamps and common uses
Negative timestamps represent dates before the Unix epoch. Developers use epoch time for logs, database records, API payloads, cache expiry, scheduling, and sorting events across systems.
Frequently asked questions
How do I convert Unix time manually?
Start at January 1, 1970 UTC and add the timestamp's seconds. For milliseconds, divide by 1,000 first.
Why does the local date differ from UTC?
Your local representation includes your timezone offset and daylight-saving rules. Both displays still represent the same instant.
Does this tool send dates to a server?
No. All parsing and conversion happens locally in your browser.
How the Unix timestamp converter works
The tool works in both directions. In Timestamp to date mode, paste an epoch value, choose whether it is in seconds or milliseconds, and press Convert. The unit is always explicit so a value such as 1000 is never guessed. You get the same instant written five ways: a UTC date and time, an ISO 8601 string, the date in your browser's local timezone with the timezone name, and the timestamp in both seconds and milliseconds, each with a copy button.
In Date to timestamp mode, pick a date and a time with seconds, then choose whether to interpret that wall-clock time as UTC or as your browser's local time. The tool checks that the date actually exists in that timezone, so February 30 or a time that falls inside a daylight saving gap is rejected rather than silently shifted. The Now button fills in the current moment in either mode. Decimal seconds and negative values are accepted.
What a Unix timestamp is
Unix time, also called epoch time or POSIX time, counts the number of seconds that have elapsed since the Unix epoch: 00:00:00 UTC on January 1, 1970. It is a single integer with no timezone, no daylight saving rules, and no calendar quirks, which makes it easy to store, compare, sort, and do arithmetic on. Almost every operating system, database, and programming language can produce and consume it.
To check that example by hand, divide 1,700,000,000 by 86,400 to get 19,675 full days with 80,000 seconds left over. 19,675 days after January 1, 1970 is November 14, 2023, and 80,000 seconds is 22 hours, 13 minutes, and 20 seconds. Unix time deliberately ignores leap seconds: every day is treated as exactly 86,400 seconds, so the count stays simple even though UTC has occasionally inserted an extra second.
Seconds versus milliseconds
Classic Unix time is measured in seconds, and that is what you get from the date +%s command, PHP's time(), Python's time.time(), and most database functions. JavaScript's Date.now() and Java's System.currentTimeMillis() return milliseconds instead, which is 1,000 times larger. Some systems go further: Python's time.time_ns() and many logging frameworks use microseconds or nanoseconds.
A quick way to tell them apart is digit count. For current dates a seconds timestamp has 10 digits, milliseconds has 13, microseconds has 16, and nanoseconds has 19. If you have a microsecond or nanosecond value, divide it by 1,000 or 1,000,000 before converting it as milliseconds here.
UTC, local time, and ISO 8601
A timestamp identifies one instant, but displaying it as a date requires choosing a timezone. The UTC row shows the instant against the global reference clock, which is what servers and logs usually use. The local row applies your browser's IANA timezone, including any daylight saving offset in effect on that date, so the two rows can differ by several hours while still describing the same moment.
The ISO 8601 row uses the format 2023-11-14T22:13:20.000Z. The trailing Z means UTC, and the format sorts correctly as plain text, which is why it is the standard for APIs and JSON. When converting a typed date back to a timestamp, the Interpret as setting decides whether 09:00 means 09:00 UTC or 09:00 in your local zone. During the one-hour overlap when clocks fall back, a local time is ambiguous and the browser picks one of the two possible instants.
The year 2038 problem and the range of Unix time
Many older systems store Unix time as a signed 32-bit integer, which tops out at 2,147,483,647. That value corresponds to 03:14:07 UTC on January 19, 2038; one second later the counter wraps to a negative number and reads as December 13, 1901. This is the year 2038 problem. Modern operating systems and languages use 64-bit integers, which push the limit billions of years into the future, but embedded devices, old file formats, and some database columns still use 32 bits.
Negative timestamps are valid and represent dates before 1970, so -86,400 is December 31, 1969. This converter uses JavaScript's Date range, which spans about 273,790 years either side of the epoch, and reports an error for anything outside it.
- 0 – 1970-01-01T00:00:00Z, the Unix epoch
- 1,000,000,000 – 2001-09-09T01:46:40Z
- 1,700,000,000 – 2023-11-14T22:13:20Z
- 2,147,483,647 – 2038-01-19T03:14:07Z, the 32-bit signed limit
- -1 – 1969-12-31T23:59:59Z
Frequently asked questions
What is the current Unix timestamp?
Press the Now button to fill in the current time from your device's clock. The Unix seconds row shows the number of seconds since January 1, 1970 UTC, and the milliseconds row shows the same instant times 1,000.
How do I tell whether a timestamp is in seconds or milliseconds?
Count the digits. For dates between 2001 and 2286 a seconds timestamp has 10 digits and a milliseconds timestamp has 13. If a value converts to a date in 1970, it is almost certainly milliseconds being read as seconds, or vice versa.
How do I convert a Unix timestamp to a date in code?
In JavaScript use new Date(seconds * 1000).toISOString(). In Python use datetime.fromtimestamp(seconds, tz=timezone.utc). In a Unix shell use date -u -d @1700000000 on Linux or date -u -r 1700000000 on macOS.
What is the year 2038 problem?
Systems that store Unix time in a signed 32-bit integer cannot count past 2,147,483,647, which is 03:14:07 UTC on January 19, 2038. After that the value overflows to a negative number and the date appears to jump back to 1901. Using a 64-bit integer fixes it.
Do Unix timestamps include leap seconds?
No. Unix time treats every day as exactly 86,400 seconds and ignores the leap seconds that are occasionally added to UTC, so it can differ from true elapsed atomic time by a few tens of seconds.
Can a Unix timestamp be negative?
Yes. A negative timestamp represents a moment before January 1, 1970. For example, -86,400 is December 31, 1969 at 00:00:00 UTC, and this converter accepts negative values in both seconds and milliseconds.