Unix Timestamp Converter (Epoch Time)

Convert Unix epoch timestamps in seconds, milliseconds or microseconds to human-readable dates in any time zone, and dates back to timestamps.

Updated · Free · Runs in your browser

Convert
hours

0 = UTC; −5 = New York (EST); 1 = Paris (CET); 5.5 = India.

Result —
ISO 8601 (UTC) —
UTC —
Relative to now —
Unix seconds —
Milliseconds —
Year 2038 check —
    Was this calculator helpful?

    The formula

    Unix time = seconds elapsed since 1970-01-01 00:00:00 UTC (the Unix epoch), ignoring leap seconds
    Milliseconds = seconds × 1,000;  microseconds = seconds × 1,000,000
    Local time = UTC + time zone offset
    32-bit overflow: 2³¹ − 1 = 2,147,483,647 s → 2038-01-19 03:14:07 UTC

    Worked example

    1. Timestamp 1767225600:
    2. 1,767,225,600 seconds ÷ 86,400 = 20,454 days after 1 January 1970, which is Thursday 1 January 2026, 00:00:00 UTC.
    3. In milliseconds that's 1767225600000, and in ISO 8601 2026-01-01T00:00:00.000Z.
    4. In New York (UTC−5) it's 19:00 on Wednesday 31 December 2025.

    What Unix time is

    Unix time, also called epoch time or POSIX time, counts the number of seconds that have passed since midnight UTC on 1 January 1970, the Unix epoch. It's a single number with no time zones, daylight saving or calendar formats, which makes it ideal for computers to store, compare and sort. Databases, log files, APIs, file systems, cookies and authentication tokens all use it. A timestamp of 0 is the epoch itself; negative timestamps represent dates before 1970.

    Seconds, milliseconds and microseconds

    Different systems use different precisions. Unix, Linux, PHP, Python's time.time() and most APIs use seconds, giving 10-digit numbers for current dates. JavaScript's Date.now(), Java's System.currentTimeMillis() and many databases use milliseconds, giving 13 digits. Some systems, such as Python's datetime and PostgreSQL, work in microseconds (16 digits), and Go and some databases in nanoseconds (19 digits). The calculator detects the precision from the number of digits, but you can set it manually.

    Time zones and ISO 8601

    A Unix timestamp is always in UTC. To show it as local time, add the time zone offset: UTC−5 for New York in winter, UTC+1 for Paris, UTC+5:30 for India. Daylight saving changes the offset during part of the year, so set the offset for the date you're converting. When exchanging dates as text, ISO 8601 format, such as 2026-01-01T00:00:00Z, is the safest choice, since it's unambiguous and sorts correctly. The trailing Z means UTC.

    Leap seconds

    The Earth's rotation isn't perfectly regular, so 27 leap seconds were added to UTC between 1972 and 2016. Unix time ignores them: every day is treated as exactly 86,400 seconds, and during a leap second the clock either repeats a second or smears it out. That means Unix time isn't a true count of elapsed seconds, but it keeps date calculations simple. In 2022, the world's timekeeping authorities agreed to stop adding leap seconds by 2035.

    The year 2038 problem

    Older software stores Unix time as a signed 32-bit integer, which can only count up to 2,147,483,647 seconds. That limit is reached at 03:14:07 UTC on 19 January 2038, after which the number wraps around to a negative value representing 1901. Most modern operating systems and languages now use 64-bit time, which won't overflow for about 292 billion years, but embedded systems, old file formats and databases with 32-bit integer columns may still be affected. The calculator shows how far any date is from the limit.

    Getting the timestamp in code

    Every major language has a one-liner for the current Unix time: Math.floor(Date.now() / 1000) in JavaScript, int(time.time()) in Python, time() in PHP, Instant.now().getEpochSecond() in Java, DateTimeOffset.UtcNow.ToUnixTimeSeconds() in C#, time.Now().Unix() in Go, and date +%s in a Unix shell. To go the other way, most languages accept a timestamp in their date constructors, as long as you pass the right unit. Mixing up seconds and milliseconds is the most common bug: a date in January 1970 usually means a seconds value was treated as milliseconds, and a date tens of thousands of years in the future means the reverse.

    Authentication tokens store their issue and expiry times as Unix seconds; our JWT decoder converts them automatically. For scheduled jobs, the cron expression calculator lists upcoming run times, and for converting meeting times between cities, use the time zone converter. To count the days between two dates, try the date difference calculator.

    Frequently asked questions

    What is the current Unix timestamp?
    The calculator shows the current Unix time in the notes below the results. It increases by one every second.
    How do I convert a Unix timestamp to a date?
    Divide by 86,400 to get days since 1 January 1970 and add them to that date, or let the calculator do it. In JavaScript, use new Date(seconds × 1000); in Python, datetime.fromtimestamp(seconds, timezone.utc).
    Is Unix time in UTC?
    Yes. Unix time has no time zone; it counts seconds since the epoch in UTC. Convert it to local time by applying a UTC offset.
    Why does my timestamp have 13 digits?
    It's in milliseconds, as used by JavaScript and Java. Divide by 1,000 to get seconds.
    What happens in 2038?
    Signed 32-bit Unix timestamps overflow at 03:14:07 UTC on 19 January 2038. Systems using 64-bit time are not affected.

    ↑↓ to navigate · Enter to open