Skip to content

Epoch & Unix Timestamp Converter

Convert Unix timestamps to human-readable dates and formats in UTC, ISO 8601, and your local timezone. Works with seconds, milliseconds, microseconds, and nanoseconds.

Enter a Unix timestamp (seconds or ms) or a date string like "2024-01-15 10:30:00"

UTC Date/Time
Tue, 14 Nov 2023 22:13:20 GMT
ISO 8601
2023-11-14T22:13:20.000Z
Local Date/Time
11/14/2023, 10:13:20 PM
Unix Timestamp (seconds)
1,700,000,000
Unix Timestamp (milliseconds)
1,700,000,000,000
Input Detected As
Detected as: seconds

Как это работает

Формула

Date = new Date(timestamp × 1000) | Epoch = Math.floor(Date.now() / 1000)

Пример расчета

Epoch timestamp 1700000000 converts to Tuesday, November 14, 2023 10:13:20 PM UTC (or 2023-11-14T22:13:20Z).

Understanding Unix Timestamps and the Epoch

The Unix epoch is the universal reference point used across operating systems, distributed databases, cloud APIs, and programming runtimes to measure time independently of geographical time zones and daylight saving time (DST) shifts.

Seconds vs. Milliseconds vs. Microseconds

When debugging API payloads or database records, identifying the unit of measurement is the most common hurdle:

UnitNumber of DigitsExampleCommon Runtime / Use Case
Seconds10 digits1742400000Linux CLI, Unix kernel, Redis, JWT expiry
Milliseconds13 digits1742400000000JavaScript, Java, MongoDB ISODate
Microseconds16 digits1742400000000000Python datetime, Cassandra, PostgreSQL
Nanoseconds19 digits1742400000000000000Go time.Now().UnixNano(), InfluxDB

Common Conversion Snippets

  • JavaScript / Node.js:
    // Current epoch seconds
    const sec = Math.floor(Date.now() / 1000);
    // Epoch to Date
    const date = new Date(1742400000 * 1000);
  • Python 3:
    import time
    from datetime import datetime, timezone
    # Epoch to UTC string
    utc_time = datetime.fromtimestamp(1742400000, tz=timezone.utc)
  • PostgreSQL:
    SELECT TO_TIMESTAMP(1742400000);

Часто задаваемые вопросы

What is Unix Epoch time?

Unix epoch time (or POSIX time) is the number of seconds that have elapsed since 00:00:00 UTC on Thursday, 1 January 1970, not counting leap seconds.

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

Standard 10-digit integers (e.g. 1700000000) represent seconds. Standard 13-digit integers (e.g. 1700000000000) represent milliseconds (used by JavaScript `Date.now()`). 16-digit timestamps represent microseconds, and 19-digit timestamps represent nanoseconds.

What is the Year 2038 problem (Y2038)?

On January 19, 2038 at 03:14:07 UTC, 32-bit signed integers will overflow from 2,147,483,647 to -2,147,483,648, wrapping back to the year 1901. Modern 64-bit systems are immune and safe for billions of years.

How do I get the current epoch timestamp in programming languages?

In JavaScript: `Math.floor(Date.now() / 1000)`. In Python: `import time; int(time.time())`. In PHP: `time()`. In SQL: `UNIX_TIMESTAMP()`.

Последнее обновление: 19 мар. 2026 г.