About this tool
This Unix timestamp converter shows the current epoch time ticking live in seconds and milliseconds, converts any timestamp you paste into a human-readable date, and converts a date and time back into a timestamp. Paste a value from a log file, database column, API response, or JWT claim and the page detects whether it is in seconds, milliseconds, microseconds, or nanoseconds from its size, then shows the moment in your local time zone, in UTC, as ISO 8601 and RFC 2822 strings, and as a relative phrase such as 3 days ago. The reverse panel takes a calendar date and clock time in local time or UTC and returns the epoch seconds and milliseconds. A reference table lists the landmark timestamps developers meet most, including the 2038 signed 32-bit rollover. It is for developers, data analysts, and support engineers who read timestamps all day.
How it works
Unix time counts the number of seconds elapsed since 1970-01-01T00:00:00 UTC, the Unix epoch, ignoring leap seconds so every day is exactly 86,400 seconds. JavaScript's Date works in milliseconds since the same epoch, so a timestamp in seconds is multiplied by 1,000 before being turned into a Date; microseconds and nanoseconds are divided by 1,000 and 1,000,000. Unit detection uses magnitude: values below 10^11 are treated as seconds (that covers every date before the year 5138), below 10^14 as milliseconds, below 10^17 as microseconds, and larger values as nanoseconds. Local-time output uses the browser's own time zone via Intl.DateTimeFormat, and UTC output is formatted from the Date's getUTC* fields so the ISO 8601 string always ends in Z. Date-to-timestamp conversion uses the Date object's UTC setters for UTC input and the local Date constructor for local input, so daylight saving time is handled by the browser's zone database rather than a hard-coded offset.
Frequently asked questions
Is my timestamp in seconds or milliseconds?
Count the digits. A current Unix timestamp in seconds has 10 digits (1,700,000,000 was November 2023), in milliseconds 13 digits, in microseconds 16, and in nanoseconds 19. Timestamps from JavaScript, Java, and many JSON APIs are milliseconds; those from Unix tools, PHP, Python's time.time(), and most databases are seconds. This page guesses from the size but you can force a unit with the unit selector if a historical or far-future value is misdetected.
What is the year 2038 problem?
Systems that store Unix time in a signed 32-bit integer can count only up to 2,147,483,647 seconds, which is 2038-01-19T03:14:07Z. One second later the value wraps to -2,147,483,648, which reads as 1901-12-13. Most modern operating systems, databases, and languages now use 64-bit time values, which will not overflow for about 292 billion years, but embedded devices, old file formats, and legacy databases can still be affected.
Does Unix time include leap seconds?
No. Unix time defines every day as exactly 86,400 seconds, so when a leap second is inserted the Unix clock effectively repeats a second (or smears it across the day on systems like Google's and Amazon's servers). This means Unix time is not a true count of SI seconds since 1970; it is off by the 27 leap seconds inserted between 1972 and 2016. For calendar conversions this does not matter, since the calendar is what Unix time tracks.
Why does the local date differ from the UTC date?
A timestamp is a single instant, but the calendar date that instant falls on depends on the time zone. 1,700,000,000 is 22:13 UTC on 14 November 2023, which is already 15 November in Tokyo (UTC+9) and still 14 November in New York (UTC-5). Store and exchange timestamps in UTC or as raw epoch values, and convert to local time only when displaying to a person.