tigtools

Unix Timestamp Converter

Paste an epoch timestamp to see the date in UTC and your time zone, or pick a date to get its timestamp. The unit is detected automatically.

Runs in your browser No sign-up

Current Unix time

Seconds

…

Milliseconds

…

Timestamp → date

Date → timestamp

Interpret as

The date is read in your device's time zone (UTC).

How to use it

  1. Paste a timestamp into “Timestamp → date”. The tool detects whether it is in seconds, milliseconds, microseconds or nanoseconds, or you can choose the unit.
  2. Read the date in your local time, in UTC, as ISO 8601 and as RFC 2822, and copy the format you need.
  3. To go the other way, pick a date and time under “Date → timestamp” and choose whether it is local time or UTC.
  4. The current Unix time at the top updates every second. Pause it to copy a fixed value.

How it works

Unix time (also called epoch or POSIX time) counts the seconds since 1 January 1970, 00:00:00 UTC. It is the same number everywhere in the world at a given moment, which is why it is used in databases, logs, APIs and file systems. Times before 1970 are negative: -86400 is 31 December 1969.

Different systems use different units. Unix tools, PHP and most APIs use seconds (10 digits for current dates), JavaScript and Java use milliseconds (13 digits), and some databases and tracing systems use microseconds (16 digits) or nanoseconds (19 digits). The automatic detection counts the digits of the integer part: up to 11 digits is read as seconds, 12–14 as milliseconds, 15–17 as microseconds and 18 or more as nanoseconds. This is correct for dates from about 1973 to 5138; for other dates, choose the unit yourself.

The results are shown in several formats. ISO 8601 (2023-11-14T22:13:20.000Z) is the standard for data exchange; the Z means UTC. RFC 2822 (Tue, 14 Nov 2023 22:13:20 +0000) is used in email headers and RSS feeds. The local time uses your browser's time zone and language settings, including daylight saving time.

Unix time ignores leap seconds: every day is exactly 86,400 seconds. Dates are displayed with millisecond precision, the resolution of JavaScript dates, so the extra digits of microsecond and nanosecond timestamps are dropped from the displayed dates.

Examples

Reading a log entry

A log line contains ts=1700000000. It has 10 digits, so it is read as seconds: Tuesday, 14 November 2023, 22:13:20 UTC, shown in your own time zone below it.

A JavaScript Date.now() value

1700000000000 has 13 digits and is read as milliseconds: the same moment as the example above. If you divide by 1,000 you get the Unix time in seconds that a PHP or Python backend expects.

Setting an expiry for an API token

To make something expire on 1 January 2030 at midnight UTC, choose that date with “UTC” selected: the Unix seconds value is 1893456000, ready for an exp claim or a cache header.

Frequently asked questions

How do I know if my timestamp is in seconds or milliseconds?

Count the digits. For dates in recent decades, seconds have 10 digits (e.g. 1700000000) and milliseconds have 13 (e.g. 1700000000000). The tool does this automatically and tells you which unit it used.

Does a Unix timestamp depend on the time zone?

No. A timestamp identifies one instant, the same everywhere. Only its display as a calendar date and clock time depends on the time zone, which is why the tool shows both UTC and your local time.

What is the year 2038 problem?

Systems that store Unix time as a signed 32-bit integer can only count to 2,147,483,647, which is 19 January 2038, 03:14:07 UTC. One second later the value overflows. Modern systems use 64-bit values, which avoid the problem; this tool is not affected.

Can I convert dates before 1970?

Yes. Enter a negative timestamp such as -31536000 (1 January 1969) or choose an earlier date in “Date → timestamp”.

Why does the local time differ from UTC by an odd amount?

Some time zones are offset by 30 or 45 minutes (for example India at UTC+5:30 and Nepal at UTC+5:45), and daylight saving time changes the offset during part of the year. The local time shown follows your device's time zone rules for that date.

Privacy

All conversions use your browser's clock and date functions. Nothing you enter is uploaded, stored or included in analytics.