Skip to content

Runs entirely in your browser. Nothing you paste leaves this page.

Free / No sign-up

Unix timestamp converter: epoch to date and back.

Convert Unix time in seconds or milliseconds to a readable date in any time zone, or turn a date and time back into an epoch timestamp. Everything runs in your browser.

Current Unix time

...

13 or more digits are read as milliseconds.

Results appear here.

Unix time counts seconds since 1 January 1970 UTC and ignores leap seconds. Converting runs in your browser using its time zone database.

How to use it.

  1. 01

    Paste a timestamp in seconds or milliseconds, or any ISO 8601 date. The current Unix time is filled in to start.

  2. 02

    Pick a time zone to see the same instant there, with its UTC offset, an HTTP date and relative time.

  3. 03

    To go the other way, set a date and time on the right and copy the Unix seconds or milliseconds.

What it does.

Everything this tool handles, all of it inside your browser tab.

  • Live current Unix time, with one-click copy in seconds or milliseconds
  • Detects seconds or milliseconds automatically and tells you which it used
  • Accepts negative and fractional timestamps, ISO 8601 and RFC 2822 dates
  • Every IANA time zone your browser supports, with correct daylight-saving offsets
  • ISO 8601 in UTC and in the chosen zone, RFC 9110 HTTP date, readable date and relative time
  • Date and time to Unix seconds, milliseconds and UTC in any zone
  • Copy button on every value
  • Runs entirely in your browser: nothing is sent or stored

Worked examples.

  • Convert a Unix timestamp to a date

    1700000000
    → read as seconds
    → 2023-11-14T22:13:20.000Z (UTC)
    → Wednesday, 15 November 2023 at 02:13:20 GST (Asia/Dubai)

    Ten digits means seconds. The same instant is 22:13 in UTC and 02:13 the next day in Dubai, which is UTC+4.

  • Convert milliseconds to a date

    1791624600000
    → read as milliseconds (13 digits)
    → 2026-10-10T09:30:00.000Z (UTC)
    → Saturday, 10 October 2026 at 15:00:00 GMT+5:30 (Asia/Kolkata)
    → Saturday, 10 October 2026 at 05:30:00 GMT-4 (America/New_York)

    JavaScript's Date.now() returns this form. Divide by 1,000 to get Unix seconds: 1791624600.

  • Get the current Unix timestamp in code

    JavaScript   Math.floor(Date.now() / 1000)
    Python       int(time.time())
    Java         Instant.now().getEpochSecond()
    Go           time.Now().Unix()
    PHP          time()
    Bash         date +%s
    PostgreSQL   SELECT extract(epoch FROM now())::bigint;
    MySQL        SELECT UNIX_TIMESTAMP();

    Each returns seconds. In JavaScript, Date.now() on its own gives milliseconds.

  • Convert a date to a Unix timestamp

    2025-01-01T00:00:00Z → 1735689600
    
    JavaScript   Date.parse("2025-01-01T00:00:00Z") / 1000
    Python       datetime(2025, 1, 1, tzinfo=timezone.utc).timestamp()
    Bash (GNU)   date -d "2025-01-01T00:00:00Z" +%s

    Always include the Z or an offset. Without it, the result depends on the time zone of the machine running the code.

  • The year 2038 boundary

    2147483647  → 2038-01-19T03:14:07Z  (largest signed 32-bit value)
    2147483648  → 2038-01-19T03:14:08Z  (fine in 64-bit)
    32-bit overflow → -2147483648 → 1901-12-13T20:45:52Z

    Paste both values above to see the boundary. Systems that still store time in 32 bits wrap round to 1901.

What is a Unix timestamp?

A Unix timestamp, also called epoch time or POSIX time, is the number of seconds that have passed since 00:00:00 UTC on 1 January 1970, the Unix epoch. 1700000000 is 22:13:20 UTC on 14 November 2023; 0 is the epoch itself; negative numbers count backwards to dates before 1970.

Unix time treats every day as exactly 86,400 seconds and ignores leap seconds. The 27 leap seconds added to UTC between 1972 and the end of 2016 do not appear in it, which keeps date arithmetic simple: subtract two timestamps and you have the seconds between them, give or take those rare leap seconds. No leap second has been added since 2016, and the decision to phase them out by 2035 means this edge case is fading.

A timestamp has no time zone. It names one instant that is the same everywhere on Earth, which is why it is the safest way to store and exchange moments in time. Time zones only matter when you display it, and that is the job this converter does for you.

Seconds, milliseconds or microseconds: how to tell them apart

The unit is the most common source of timestamp bugs. Timestamps in seconds have 10 digits for every date between September 2001 and November 2286. Milliseconds have 13 digits, microseconds 16 and nanoseconds 19.

Different platforms pick different units. JavaScript's Date.now() and Java's System.currentTimeMillis() return milliseconds. Python's time.time() returns seconds as a float, Go has time.Now().Unix() for seconds and UnixMilli() for milliseconds, PHP's time() and the shell's date +%s return seconds, and JWT exp and iat claims are in seconds by specification. Databases vary, so check the column documentation.

This converter reads any whole number with 13 or more digits as milliseconds and anything shorter as seconds, and says which it chose under the input. A 16-digit microsecond value would therefore be read as milliseconds and land tens of thousands of years in the future: divide it by 1,000 first. A 19-digit nanosecond value is outside the range JavaScript dates support, so divide by 1,000,000.

How this epoch converter works

Conversion uses your browser's own date engine and its built-in copy of the IANA time zone database, the same data that operating systems and programming languages use. Every IANA zone your browser knows is in the list, from UTC to Asia/Kolkata, Asia/Dubai, Europe/London, America/New_York, Australia/Sydney and Pacific/Auckland, with the correct daylight-saving offset for the exact instant shown.

For each input you get Unix seconds and milliseconds, ISO 8601 in UTC, ISO 8601 in the chosen zone with its offset, the HTTP date format from RFC 9110 used in headers such as Last-Modified, a long readable date and a relative time such as '3 hours ago'. The right-hand panel works in reverse: a date and time you enter is read as wall-clock time in the chosen zone and converted to Unix seconds, milliseconds and UTC.

Nothing is sent to a server, so you can paste timestamps from production logs or tokens without them leaving your device. If you are reading token expiry times, the JWT decoder converts exp, iat and nbf claims for you.

Why does my timestamp convert to the wrong date?

A date in January 1970 almost always means seconds were passed where milliseconds were expected: new Date(1700000000) in JavaScript is 20 January 1970, while new Date(1700000000 * 1000) is November 2023. A date tens of thousands of years ahead is the opposite mistake.

A result that is off by a whole number of hours usually means a time zone was applied twice, or a local time was stored as if it were UTC. One hour off for part of the year points to daylight saving. The fix is the same in every language: store and transmit UTC, either as a Unix timestamp or as ISO 8601 with a Z or an explicit offset, and convert to local time only at the moment you display it.

Watch date strings without an offset. In JavaScript a date-only string such as 2026-10-10 is parsed as UTC midnight, but a date-time such as 2026-10-10T09:30 is parsed as local time on whichever machine runs the code. Always include Z or an offset like +05:30 in APIs, logs and the REST APIs you design.

What is the year 2038 problem?

Systems that store Unix time as a signed 32-bit integer can count up to 2,147,483,647, which is 03:14:07 UTC on 19 January 2038. One second later the value overflows to -2,147,483,648 and the date jumps back to 13 December 1901. It is the Unix equivalent of the Y2K bug.

Modern 64-bit operating systems, languages and databases use 64-bit time and are safe for billions of years; JavaScript dates run to the year 275,760. The risk sits in older embedded devices and firmware, 32-bit builds, binary file formats and database columns. For example, MySQL documents its TIMESTAMP column type as ending at 2038-01-19 03:14:07 UTC, so long-lived dates such as contract end dates or certificates belong in DATETIME or a 64-bit integer instead.

Testing is straightforward: paste 2147483647 and 2147483648 above to see the boundary, then feed dates after 2038 through your own system, including any scheduled jobs. The cron expression explainer helps you check when those jobs actually run.

ISO 8601, RFC 3339 and HTTP dates compared

ISO 8601 is the international standard for writing dates and times, such as 2026-10-10T09:30:00Z. RFC 3339 is a stricter internet profile of it that requires a full date, a full time and a Z or numeric offset, and it is what most JSON APIs mean when they say 'ISO date'. The ISO 8601 strings this converter produces are valid RFC 3339.

HTTP headers use a different, older format defined in RFC 9110, for example Sat, 10 Oct 2026 09:30:00 GMT, always in GMT. Logs often use Unix seconds for compactness and sorting. Pick one canonical format per system, document it, and convert at the edges.

Questions, answered

Something else on your mind? Ask a consultant and get a reply within one business day.

What is a Unix timestamp?

The number of seconds that have passed since 00:00:00 UTC on 1 January 1970, not counting leap seconds. It identifies one instant regardless of time zone, which makes it a reliable way to store and compare times.

How do I convert a Unix timestamp to a date?

Paste it into the converter above and read the date in UTC or in any time zone you pick. In code, multiply seconds by 1,000 for JavaScript's new Date(), or use datetime.fromtimestamp(ts, tz=timezone.utc) in Python.

How do I tell seconds from milliseconds?

Count the digits. Current timestamps in seconds have 10 digits and in milliseconds 13. The converter switches to milliseconds at 13 digits and shows which unit it used.

What is the current Unix timestamp?

It is shown live at the top of this page, updating every second, with buttons to copy it in seconds or milliseconds. On the command line, date +%s prints it on Linux and macOS.

Is a Unix timestamp the same in every time zone?

Yes. A timestamp counts seconds from a fixed instant in UTC, so it is identical everywhere. Only its display as a local date and time changes from zone to zone.

Why does my timestamp show a date in 1970?

The value is in seconds but was read as milliseconds, so it lands a few weeks after the epoch. Multiply by 1,000 before passing it to an API that expects milliseconds, such as JavaScript's Date.

Why is my converted time a few hours off?

A time zone was probably applied twice, or a local time was saved as if it were UTC. Store times in UTC with a Z or explicit offset and convert only for display; check the zone selector here matches the zone you expect.

Does Unix time include leap seconds?

No. Unix time assumes every day has exactly 86,400 seconds. During a leap second, systems repeat or smear a second instead, and none has been added since the end of 2016.

What is the year 2038 problem?

Systems that store Unix time as a signed 32-bit integer overflow at 03:14:07 UTC on 19 January 2038 and jump back to 1901. 64-bit storage avoids it; older embedded devices, file formats and some database column types still need checking.

Which time zone does the converter use?

Your browser's zone by default. Pick any IANA zone, such as Asia/Kolkata, Europe/London or America/New_York, to see the same instant there with the correct daylight-saving offset.

Is my data sent anywhere?

No. Conversion uses your browser's built-in date and time zone functions in this tab, so timestamps from logs or tokens never leave your device.

More free tools.

All tools

Need tooling like this inside your product?

We build internal tools, developer platforms and APIs. Tell us what your team keeps doing by hand.