Converters

Epoch converter for Unix timestamps and dates

This epoch converter turns a Unix timestamp into a UTC date, and a date back into a timestamp, in seconds, milliseconds, microseconds or nanoseconds. Conversion runs in your browser: choose a direction, enter a value, then convert to see all four units and the UTC date together.

Convert

Choose the unit explicitly. Signed decimal values are accepted.

Enter a value, then convert.

Result

One instant, shown as a UTC date and in four epoch units.

Your converted date and timestamps will appear here.

How to convert a timestamp or date

To convert an epoch timestamp to a date, set Direction to Epoch to date, enter the timestamp, choose its Timestamp unit, then select Convert. To go the other way, set Direction to Date to epoch and enter an ISO date and time instead.

  1. Set Direction: Epoch to date, or Date to epoch.
  2. For an epoch value, choose Timestamp unit: seconds, milliseconds, microseconds or nanoseconds. For a date, the unit field is hidden and the input expects an ISO date and time with an explicit offset.
  3. Enter the value, or select Use now to fill epoch milliseconds from your device clock and convert at once.
  4. Select Convert. The result shows one UTC date and time next to all four epoch units, each with its own Copy button. Copy result copies all five values, and Download .txt saves them as epoch-conversion.txt. Cancel stops a conversion in progress; Reset clears the form.

Date input format

Use YYYY-MM-DDTHH:mm:ss.sssZ for a date, for example 2024-02-29T12:30:00.123456789Z. The seconds and their fraction are optional, but the offset is not: end the value with Z for UTC or a numeric offset such as +05:30 or -04:00. A space cannot replace the T, and a slash-formatted date such as 03/04/2024 is not accepted.

Years use four digits, or a sign and six digits for a year before 0000 or after 9999, matching the calendar's extended range. Month and day values are checked against the real calendar, so 2024-02-30 is rejected even though its digits look plausible; 2024-02-29 is accepted, since 2024 is a leap year. Hour, minute and second values above their normal maximum are also rejected, and a seconds field of 60 for a leap second is not supported.

Precision and date ranges

Decimal epoch values keep up to nanosecond precision, using integer arithmetic rather than floating-point math, so a value like 1700000000.123456789 seconds converts without rounding error. Trailing zeros beyond the chosen unit's precision are allowed; a nonzero digit finer than one nanosecond is rejected rather than silently rounded away. A negative epoch value floors to the preceding calendar second: for example, -1 nanosecond converts to 1969-12-31T23:59:59.999999999Z, one nanosecond before the epoch, not to a negative fraction of a second.

The supported range runs from -271821-04-20T00:00:00Z through +275760-09-13T00:00:00Z, the native JavaScript Date boundary, in either direction. An instant one nanosecond past either end is rejected with a range error; the two boundary instants themselves convert successfully. That boundary is 8,640,000,000,000,000,000,000 nanoseconds from the epoch in each direction, the limit built into JavaScript's own Date object, not a limit this tool adds on top of it.

Limits

The plain-text report and the downloaded epoch-conversion.txt file always list all five values together: the UTC date and the four epoch units. The report lists each value on its own line, labelled UTC date, Epoch seconds, Epoch milliseconds, Epoch microseconds and Epoch nanoseconds, in that order, matching the on-page result. This converter runs entirely on typed or pasted text; it reads no file, so no file-size limit applies.

Named time zones and daylight-saving rules are never guessed, and -00:00 is rejected, because it marks the offset as unknown rather than naming a real zone. An epoch value cannot use a comma as a thousands separator or exponent notation such as 1.7e9; only an optional + or - sign, digits and one optional decimal point are accepted. A date input must spell T and Z in uppercase: a lowercase t is rejected as an invalid date, and a lowercase z is rejected as a missing offset.

Questions

What is Unix/epoch time?

Unix time counts elapsed time from 1970-01-01T00:00:00Z, called the Unix epoch. Zero is that instant; positive numbers count forward and negative numbers count backward from it. A millisecond is a thousandth of a second, a microsecond a millionth and a nanosecond a billionth, and this converter accepts any of the four as the timestamp unit.

What was epoch time 0 (the Unix epoch)?

Converting 0 seconds with this tool returns 1970-01-01T00:00:00.000Z, the Unix epoch itself. The same instant appears whichever unit you convert it in: 0 seconds, 0 milliseconds, 0 microseconds and 0 nanoseconds all resolve to the same UTC date and time.

Does this tool support milliseconds, microseconds and nanoseconds?

Yes. The Timestamp unit selector covers seconds, milliseconds, microseconds and nanoseconds explicitly, and the value is never reinterpreted by its digit count. Every result also shows the same instant in all four units at once, so you can read whichever unit another system expects without a second conversion.

Why do I need to include a UTC offset when entering a date?

A date without an offset could be any instant across a 26-hour span, because UTC offsets run from -12:00 to +14:00, so this tool requires an explicit Z or a numeric offset. It never guesses a local time zone, and an unresolved -00:00 offset is rejected rather than treated as UTC.

What date range does this converter support?

Instants from -271821-04-20T00:00:00Z through +275760-09-13T00:00:00Z convert successfully; that range is the native JavaScript Date boundary this tool relies on. A value one nanosecond beyond either end is rejected with a range error rather than clamped to the nearest supported instant.

Does the tool round very precise timestamps?

No. A value with precision finer than one nanosecond, meaning a nonzero digit past the ninth decimal place in seconds, is rejected rather than rounded. Trailing zero digits at that precision are still accepted, since they add no information the tool would need to discard.

How are daylight-saving overlaps handled?

Supply the numeric offset that applied at that instant. For example, 2024-11-03T01:30:00-04:00 and 2024-11-03T01:30:00-05:00 are an hour apart despite sharing the same local clock reading. Named time zone rules and daylight-saving transitions are never inferred, so the offset you enter is the one this tool uses.

What is the current time in Epoch time?

Select Use now. It reads your device's clock once, fills in the current epoch milliseconds and converts them, so you see the current time in all four units and as a UTC date. It is not a live clock or a network time service, so it is only as accurate as your device's clock.