# UNIX Timestamp Converter

> Convert UNIX timestamps to human-readable dates and back. Displays current epoch time in real-time, local time, UTC, and relative time. Completely free online.

URL: https://acrafto.com/en/unix-timestamp-converter/

Tools are interactive browser apps; there is no public API, no endpoints to call and no server-side processing. To use a tool, open its HTML page in a browser.

## 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 Format | Example | Typical Use |
| --- | ---: | --- |
| **Seconds (s)** | `1700000000` | databases, backend, APIs, files |
| **Milliseconds (ms)** | `1700000000000` | JavaScript (`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 Shell** – `date +%s` returns the current timestamp.
- **JavaScript** – `Date.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.

## Other languages

- Čeština (cs): [Unix timestamp převodník](https://acrafto.com/cs/unix-timestamp/) ([Markdown](https://acrafto.com/cs/unix-timestamp/index.md))
- Slovenčina (sk): [Unix timestamp konvertor](https://acrafto.com/sk/unix-timestamp-prevodnik/) ([Markdown](https://acrafto.com/sk/unix-timestamp-prevodnik/index.md))
- Deutsch (de): [Unix Timestamp umrechnen](https://acrafto.com/de/unix-timestamp-konverter/) ([Markdown](https://acrafto.com/de/unix-timestamp-konverter/index.md))
- Français (fr): [Convertisseur timestamp Unix](https://acrafto.com/fr/convertisseur-timestamp-unix/) ([Markdown](https://acrafto.com/fr/convertisseur-timestamp-unix/index.md))
- Español (es): [Convertidor de UNIX timestamp](https://acrafto.com/es/convertidor-timestamp-unix/) ([Markdown](https://acrafto.com/es/convertidor-timestamp-unix/index.md))
- Italiano (it): [Convertitore timestamp UNIX](https://acrafto.com/it/convertitore-timestamp-unix/) ([Markdown](https://acrafto.com/it/convertitore-timestamp-unix/index.md))
- Português (pt): [Conversor de timestamp Unix](https://acrafto.com/pt/conversor-timestamp-unix/) ([Markdown](https://acrafto.com/pt/conversor-timestamp-unix/index.md))
- Nederlands (nl): [Unix timestamp converter](https://acrafto.com/nl/unix-timestamp-converter/) ([Markdown](https://acrafto.com/nl/unix-timestamp-converter/index.md))
- Polski (pl): [Konwerter UNIX timestamp](https://acrafto.com/pl/konwerter-unix-timestamp/) ([Markdown](https://acrafto.com/pl/konwerter-unix-timestamp/index.md))
- Română (ro): [Convertor Unix timestamp](https://acrafto.com/ro/convertor-unix-timestamp/) ([Markdown](https://acrafto.com/ro/convertor-unix-timestamp/index.md))
- Magyar (hu): [UNIX időbélyeg konvertáló](https://acrafto.com/hu/unix-idobelyeg-atalakito/) ([Markdown](https://acrafto.com/hu/unix-idobelyeg-atalakito/index.md))
- Ελληνικά (el): [Μετατροπέας Unix timestamp](https://acrafto.com/el/unix-timestamp-converter/) ([Markdown](https://acrafto.com/el/unix-timestamp-converter/index.md))
- Български (bg): [Unix timestamp конвертор](https://acrafto.com/bg/unix-timestamp-konverter/) ([Markdown](https://acrafto.com/bg/unix-timestamp-konverter/index.md))
- Hrvatski (hr): [Unix timestamp konverter](https://acrafto.com/hr/unix-timestamp-konverter/) ([Markdown](https://acrafto.com/hr/unix-timestamp-konverter/index.md))
- Slovenščina (sl): [Pretvornik Unix timestamp](https://acrafto.com/sl/unix-timestamp-pretvornik/) ([Markdown](https://acrafto.com/sl/unix-timestamp-pretvornik/index.md))
- Eesti (et): [UNIX timestamp teisendaja](https://acrafto.com/et/unix-timestamp-teisendaja/) ([Markdown](https://acrafto.com/et/unix-timestamp-teisendaja/index.md))
- Latviešu (lv): [UNIX laika zīmogu pārveidotājs](https://acrafto.com/lv/unix-timestamp-konvertetajs/) ([Markdown](https://acrafto.com/lv/unix-timestamp-konvertetajs/index.md))
- Lietuvių (lt): [UNIX laiko žymės keitiklis](https://acrafto.com/lt/unix-laiko-zymes-keitiklis/) ([Markdown](https://acrafto.com/lt/unix-laiko-zymes-keitiklis/index.md))
- Svenska (sv): [Unix timestamp-omvandlare](https://acrafto.com/sv/unix-timestamp-omvandlare/) ([Markdown](https://acrafto.com/sv/unix-timestamp-omvandlare/index.md))
- Dansk (da): [UNIX timestamp konverter](https://acrafto.com/da/unix-timestamp-konverter/) ([Markdown](https://acrafto.com/da/unix-timestamp-konverter/index.md))
- Suomi (fi): [UNIX-aikaleiman muunnin](https://acrafto.com/fi/unix-aikaleiman-muunnin/) ([Markdown](https://acrafto.com/fi/unix-aikaleiman-muunnin/index.md))
- Norsk (no): [Unix timestamp-konverterer](https://acrafto.com/no/unix-tidsstempel-konverterer/) ([Markdown](https://acrafto.com/no/unix-tidsstempel-konverterer/index.md))
- Українська (uk): [Конвертер Unix timestamp](https://acrafto.com/uk/konverter-unix-chasu/) ([Markdown](https://acrafto.com/uk/konverter-unix-chasu/index.md))
- Русский (ru): [Unix timestamp конвертер](https://acrafto.com/ru/unix-timestamp-konverter/) ([Markdown](https://acrafto.com/ru/unix-timestamp-konverter/index.md))
- Српски (sr): [UNIX timestamp konverter](https://acrafto.com/sr/unix-timestamp-konverter/) ([Markdown](https://acrafto.com/sr/unix-timestamp-konverter/index.md))
- Македонски (mk): [UNIX timestamp конвертор](https://acrafto.com/mk/unix-timestamp-konvertor/) ([Markdown](https://acrafto.com/mk/unix-timestamp-konvertor/index.md))
- Bosanski (bs): [Unix timestamp konverter](https://acrafto.com/bs/unix-timestamp-konverter/) ([Markdown](https://acrafto.com/bs/unix-timestamp-konverter/index.md))
- Shqip (sq): [Konvertues Unix timestamp](https://acrafto.com/sq/konvertues-timestamp-unix/) ([Markdown](https://acrafto.com/sq/konvertues-timestamp-unix/index.md))
- Türkçe (tr): [UNIX zaman damgası dönüştürücü](https://acrafto.com/tr/unix-zaman-damgasi-donusturucu/) ([Markdown](https://acrafto.com/tr/unix-zaman-damgasi-donusturucu/index.md))
- 日本語 (ja): [UNIXタイムスタンプ変換](https://acrafto.com/ja/unix-timestamp-converter/) ([Markdown](https://acrafto.com/ja/unix-timestamp-converter/index.md))
- 한국어 (ko): [유닉스 타임스탬프 변환기](https://acrafto.com/ko/unix-timestamp-converter/) ([Markdown](https://acrafto.com/ko/unix-timestamp-converter/index.md))
- العربية (ar): [محول Unix Timestamp](https://acrafto.com/ar/unix-timestamp-converter/) ([Markdown](https://acrafto.com/ar/unix-timestamp-converter/index.md))
- हिन्दी (hi): [UNIX टाइमस्टैम्प कनवर्टर](https://acrafto.com/hi/unix-timestamp-converter/) ([Markdown](https://acrafto.com/hi/unix-timestamp-converter/index.md))
- Bahasa Indonesia (id): [Konverter Unix timestamp](https://acrafto.com/id/konverter-timestamp-unix/) ([Markdown](https://acrafto.com/id/konverter-timestamp-unix/index.md))
- Tiếng Việt (vi): [Chuyển đổi Unix timestamp](https://acrafto.com/vi/bo-chuyen-doi-unix-timestamp/) ([Markdown](https://acrafto.com/vi/bo-chuyen-doi-unix-timestamp/index.md))
- ไทย (th): [แปลง Unix Timestamp](https://acrafto.com/th/unix-timestamp-converter/) ([Markdown](https://acrafto.com/th/unix-timestamp-converter/index.md))
- עברית (he): [ממיר Unix Timestamp](https://acrafto.com/he/unix-timestamp-converter/) ([Markdown](https://acrafto.com/he/unix-timestamp-converter/index.md))
