🕐 Unix Timestamp Converter

Convert Unix timestamps to human-readable dates and back. Supports seconds/ms, timezones, bulk conversion, and a live "Now" clock.

▸ Bulk Convert (one timestamp per line)

How to Use

1

Enter a timestamp or date

Type a Unix timestamp (seconds or milliseconds) in the first field, or pick a date/time. The tool auto-detects seconds vs milliseconds.

2

Select your timezone

Choose UTC, your browser's local timezone, or any named timezone from the dropdown. All output formats update instantly.

3

Copy any format

Click Copy next to any output row — Unix seconds, milliseconds, ISO 8601, localized date, or relative time.

Frequently Asked Questions

What is a Unix timestamp? +
A Unix timestamp (also called epoch time) is the number of seconds that have elapsed since January 1, 1970 00:00:00 UTC. It is the universal standard for representing time in software systems because it has no timezone ambiguity and is easy to do arithmetic on.
What is the difference between seconds and milliseconds? +
Standard Unix timestamps count seconds since epoch (10 digits for modern dates, e.g. 1714694400). JavaScript's Date.now() and many APIs return milliseconds (13 digits, e.g. 1714694400000). This tool auto-detects which you've entered based on the number of digits.
How do I convert a date to a Unix timestamp in JavaScript? +
Use Math.floor(new Date("2024-05-01").getTime() / 1000) for seconds, or Date.now() / 1000 for the current time. The tool does this conversion instantly for any date you enter.
What is the Unix timestamp for the year 2038 problem? +
The Year 2038 problem (Y2K38) affects 32-bit signed integers, which overflow at Unix timestamp 2147483647 (January 19, 2038, 03:14:07 UTC). Modern 64-bit systems are not affected — they can represent dates billions of years in the future.
Can I convert multiple timestamps at once? +
Yes. Use the Bulk Convert section — enter one Unix timestamp per line and click Convert All to get all dates formatted at once.


Complete Guide: Unix Timestamp Converter

A Unix timestamp (also called epoch time or POSIX time) is the number of seconds elapsed since January 1, 1970, 00:00:00 UTC. It is the foundation of time representation in virtually every programming language, database, operating system, and API. Understanding timestamps — and converting them accurately — is a daily necessity for any developer working with logs, databases, scheduled jobs, or APIs.

Why Unix Timestamps?

Before epoch time became standard, systems used incompatible date formats. A Unix timestamp solves three problems simultaneously: it is timezone-agnostic (always UTC under the hood), arithmetic-friendly (subtract two timestamps to get the duration in seconds), and universally comparable across systems and languages. A timestamp of 1714694400 means exactly the same instant on a Linux server in Berlin, an iOS app in Tokyo, and a PostgreSQL database in São Paulo.

Seconds vs Milliseconds

There are two common Unix timestamp formats:

This tool auto-detects which you've entered based on the number of digits. A value greater than 9,999,999,999 is treated as milliseconds.

Code Examples

// JavaScript — current timestamp in seconds
const tsSeconds = Math.floor(Date.now() / 1000);    // 1714694400
const tsMillis  = Date.now();                       // 1714694400000

// JavaScript — timestamp to Date object
const d = new Date(1714694400 * 1000);
console.log(d.toISOString()); // "2024-05-03T00:00:00.000Z"

// JavaScript — date string to timestamp
const ts = Math.floor(new Date('2024-05-03').getTime() / 1000);

// Python — current timestamp
import time
ts = int(time.time())           # seconds since epoch

# Python — timestamp to datetime (UTC)
from datetime import datetime, timezone
dt = datetime.fromtimestamp(1714694400, tz=timezone.utc)
print(dt.isoformat())  # 2024-05-03T00:00:00+00:00

# Python — datetime to timestamp
ts = int(dt.timestamp())

// PHP — current timestamp
$ts = time();                            // seconds
$ts_ms = round(microtime(true) * 1000); // milliseconds

// PHP — timestamp to formatted date
$formatted = date('Y-m-d H:i:s', 1714694400); // "2024-05-03 00:00:00"

// SQL — PostgreSQL
SELECT to_timestamp(1714694400);
SELECT extract(epoch from now())::bigint;

-- MySQL
SELECT FROM_UNIXTIME(1714694400);
SELECT UNIX_TIMESTAMP(NOW());

Timezone Handling

A Unix timestamp always represents an exact UTC moment. The confusion arises when displaying it — the same timestamp shows different clock times in different timezones. When converting for display:

The Year 2038 Problem (Y2K38)

32-bit signed integers overflow at 2147483647 — which corresponds to January 19, 2038, 03:14:07 UTC. Systems storing timestamps in 32-bit integers will wrap around to negative values at that point. Modern 64-bit systems and most databases have already migrated to 64-bit integers, which can represent times billions of years into the future. If you're working with legacy embedded systems, check whether timestamps are stored as int32.

Common Mistakes

For cron scheduling with timestamps, see Cron Visualizer. For generating mock data with timestamps, see Mock JSON Generator.

🧰 50+ Tools