UNIX Timestamp Converter (Epoch Time Online Tool)

Current UNIX Timestamp

Seconds
Milliseconds

Timestamp → Date and Time


Date and Time → Timestamp

UNIX Timestamp Converter (Online Epoch Time Tool)

This UNIX timestamp converter allows you to quickly convert UNIX time (epoch time / POSIX time) to date and time and vice versa. It supports timestamps in seconds and milliseconds, displays local time, UTC, and ISO 8601, and results can be copied with a single click.


What is UNIX Timestamp (Epoch Time / POSIX Time)?

A UNIX timestamp is a number that expresses time as the number of seconds since January 1, 1970, 00:00:00 UTC (the UNIX epoch). In practice, it is one of the most commonly used formats for storing and transmitting dates and times in systems, databases, APIs, and logging.

Example: 1700000000 corresponds to November 14, 2023, 22:13:20 UTC.

Why January 1, 1970?

The beginning of the epoch (1970-01-01) was chosen during the design of UNIX as a practical reference point: it is close to the period of the system’s creation and allows for simple time calculations.


UNIX Timestamp in Seconds vs. Milliseconds

UNIX timestamps most commonly appear in two forms:

Timestamp FormatExampleTypical Use
Seconds (s)1700000000databases, backend, APIs, files
Milliseconds (ms)1700000000000JavaScript (Date.now()), analytics, detailed logs

How to tell what you have?

  • For “today’s” dates, seconds usually have 10 digits.
  • Milliseconds usually have 13 digits and are roughly 1000× larger.
  • As a guide: if the value is > 10¹², it’s almost certainly milliseconds.

How to Use the UNIX Timestamp Converter

1) Timestamp → Date and Time

  1. Enter the UNIX timestamp into the field, or click Now (for the current UNIX time).
  2. If the timestamp is in milliseconds, activate the Milliseconds option.
  3. Click Convert (or press Enter).
  4. The conversion to local time, UTC, and ISO 8601 will be displayed.
  5. Clicking on the result will copy it to the clipboard.

2) Date and Time → Timestamp

  1. Select the date and time in the form.
  2. Click Convert.
  3. You will get the result as a timestamp in both seconds and milliseconds.

Where is UNIX Timestamp Most Commonly Used?

You’ll encounter UNIX time virtually everywhere time is handled in IT:

  • Databases – storing and comparing times in MySQL, PostgreSQL, SQLite, etc.
  • APIs – REST/GraphQL often return time as a timestamp (easy serialization).
  • Logs and Monitoring – precise ordering of events over time.
  • Git – commits contain timestamp information.
  • File Systems – times like mtime/ctime/atime (last modification, etc.).
  • JWT – claims iat (issued at) and exp (expires) are typically in epoch seconds.
  • Linux/Unix Shelldate +%s returns the current timestamp.
  • JavaScriptDate.now() returns time in milliseconds.

Practical Examples of UNIX Time Conversion

JavaScript (timestamp ↔ date)

// Current UNIX timestamp in seconds
const tsSeconds = Math.floor(Date.now() / 1000);

// Current timestamp in milliseconds
const tsMs = Date.now();

// Timestamp (s) -> date
const dateFromSeconds = new Date(1700000000 * 1000);
console.log(dateFromSeconds.toISOString());

// Date -> timestamp (s)
const ts = Math.floor(new Date("2024-01-01T00:00:00Z").getTime() / 1000);
console.log(ts);

Python (timestamp ↔ datetime)

import time
from datetime import datetime, timezone

# Current timestamp in seconds
ts = int(time.time())

# Timestamp -> datetime (UTC)
dt_utc = datetime.fromtimestamp(1700000000, tz=timezone.utc)

# Date -> timestamp
ts2 = int(datetime(2024, 1, 1, tzinfo=timezone.utc).timestamp())

SQL (MySQL)

-- Current UNIX timestamp (s)
SELECT UNIX_TIMESTAMP();

-- Timestamp -> date
SELECT FROM_UNIXTIME(1700000000);

-- Date -> timestamp
SELECT UNIX_TIMESTAMP('2024-01-01 00:00:00');

Time Zones: UTC, Local Time, and ISO 8601

A UNIX timestamp is always in UTC – it does not contain information about time zones or daylight saving time. Conversion to local time depends on the browser, server settings, or the library used.

Concepts worth knowing:

  • UTC – a global standard without daylight saving/winter time.
  • GMT – practically identical to UTC for common use.
  • Offset – shift from UTC (e.g., UTC+1 in winter, UTC+2 in summer).

UNIX Timestamp Limits and the Year 2038 Problem

The Year 2038 Problem

On some 32-bit systems, timestamps are stored as int32 with a maximum of 2,147,483,647, which corresponds to January 19, 2038, 03:14:07 UTC. Exceeding this value can lead to overflow and incorrect time. Modern 64-bit systems typically do not have this problem.

Range of 64-bit UNIX Time

64-bit values cover an extremely wide period (in practice, “forever”). Negative values indicate dates before January 1, 1970.


FAQ – Frequently Asked Questions about UNIX Timestamp

Is UNIX timestamp in UTC, or local time? A UNIX timestamp is always in UTC. Local time is generated only upon conversion according to the time zone. Therefore, the converter usually displays both UTC and local time.
How do I know if a timestamp is in seconds or milliseconds? For the current time, a timestamp in seconds typically has 10 digits. In milliseconds, it usually has 13 digits and is roughly 1000× larger. As a guide: a value > 10¹² is usually milliseconds.
What does a negative UNIX timestamp mean? A negative timestamp represents a date before January 1, 1970. For example, -1 corresponds to December 31, 1969, 23:59:59 UTC.
How to convert UNIX timestamp in SQL? In MySQL, you use FROM_UNIXTIME(timestamp) and for the reverse, UNIX_TIMESTAMP(date). In PostgreSQL, it's typically TO_TIMESTAMP(timestamp) and EXTRACT(EPOCH FROM date).
Why does the UNIX epoch start on January 1, 1970? It's a historically chosen reference point from the early days of UNIX: simple, practical, and close to the time of the system's development.