Tools › Build › Unix Timestamp Converter
⏱️

Unix Timestamp Converter

Convert Unix timestamps to dates and dates to timestamps — seconds, milliseconds, microseconds or nanoseconds, in any time zone, right in your browser.

🕒 Live epoch clock
🌍 Any time zone
⏱️ s / ms / µs / ns
📦 Bulk convert
CURRENT UNIX TIMESTAMP
— ms
—
🌍

Time zone

Used to display dates and to read the date you enter. Timestamps themselves are always UTC.

#

Timestamp → Date

Seconds, milliseconds, microseconds or nanoseconds.

📅

Date → Timestamp

Pick a date and time in the zone above.

OR PASTE A DATE STRING
Advertisement
☰

Bulk convert

One timestamp per line — units are detected for each line. Up to 5,000 lines.

📌

Common timestamps

Click one to convert it above.

{ }

Get the timestamp in your language

Copy-ready examples for the current time, timestamp → date and date → timestamp.


How to use

  1. Paste a Unix timestamp into Timestamp → Date. The unit (seconds, milliseconds, microseconds or nanoseconds) is detected from the number of digits; override it with the unit buttons if needed.
  2. Read the result in your chosen time zone and in UTC, as ISO 8601 and RFC 2822, and as a relative time. Click any value to copy it.
  3. To go the other way, pick a date and time in Date → Timestamp or paste an ISO 8601 string. You get seconds, milliseconds, microseconds and nanoseconds.
  4. Change the time zone at the top to read or enter dates in any IANA zone, such as Asia/Kolkata or America/New_York.
  5. For log files or exports, paste many timestamps into Bulk convert and copy or download the CSV.

What is a Unix timestamp?

A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have passed since 1 January 1970, 00:00:00 UTC — the Unix epoch. Because it is a single number that does not depend on a time zone or calendar format, it is the standard way for databases, APIs, logs and programming languages to store and compare moments in time.

The timestamp 1696500000, for example, is 5 October 2023, 09:20:00 UTC. The same number means the same instant everywhere in the world; only the way it is displayed changes with the time zone.

Seconds, milliseconds, microseconds and nanoseconds

Different systems count in different units. A quick guide by digit count for current dates:

10 digits — seconds (Unix, PHP, Python time.time(), MySQL). 13 digits — milliseconds (JavaScript Date.now(), Java, many REST APIs). 16 digits — microseconds (some databases and Python datetime). 19 digits — nanoseconds (Go, high-resolution logs, tracing systems).

This converter detects the unit automatically from the digit count, and lets you force a unit when a value is ambiguous.

The Year 2038 problem

Older systems store the timestamp as a signed 32-bit integer, whose largest value is 2147483647 — 19 January 2038, 03:14:07 UTC. One second later the value overflows and wraps to a date in 1901. Modern systems use 64-bit integers, which last for roughly 292 billion years, but embedded devices, old databases and file formats can still be affected. You can check these boundary values in the Common timestamps section.

Frequently asked questions

How do I convert a Unix timestamp to a date?

Paste the timestamp into the Timestamp → Date box. The tool shows the date and time in your chosen time zone and in UTC. In code, multiply seconds by 1000 and pass the result to new Date() in JavaScript, or use datetime.fromtimestamp() in Python. The language examples at the bottom of this page cover the most common cases.

How can I tell if a timestamp is in seconds or milliseconds?

Count the digits. Today’s timestamps in seconds have 10 digits, in milliseconds 13 digits, in microseconds 16 and in nanoseconds 19. If a date comes out in 1970 or in the year 50,000, the unit is probably wrong — switch the unit buttons to compare.

Does a Unix timestamp have a time zone?

No. A Unix timestamp always counts from the epoch in UTC, so the same number is the same instant everywhere. A time zone only matters when you turn the timestamp into a human-readable date, or when you turn a local date into a timestamp. That is why this tool has a time zone selector.

Can a Unix timestamp be negative?

Yes. Negative values are moments before 1 January 1970. For example -86400 is 31 December 1969, 00:00:00 UTC. They work in this tool, and in most modern languages.

What happens to Unix time during leap seconds and daylight saving?

Unix time ignores leap seconds — every day is treated as exactly 86,400 seconds — and it is not affected by daylight saving, because it is always UTC. DST only affects the local date you see. When clocks go back, a local time such as 1:30 AM happens twice and is ambiguous; when they go forward, some local times do not exist. This tool warns you in both cases when you enter a local date.

How do I get the current Unix timestamp?

The live clock at the top of this page shows it in seconds and milliseconds. In code: Math.floor(Date.now()/1000) in JavaScript, int(time.time()) in Python, time() in PHP, date +%s in a Linux or macOS shell, and SELECT UNIX_TIMESTAMP() in MySQL.

What is the largest date a timestamp can represent?

It depends on the system. JavaScript dates go up to about the year 275,760 (±8.64 × 1015 milliseconds). A signed 32-bit timestamp ends in January 2038 and an unsigned one in February 2106. This tool accepts any value JavaScript can represent and shows time-zone conversions for years 1583–9999.

Is my data sent to a server?

No. All conversions happen in your browser using standard JavaScript. Nothing you type is uploaded or stored.