Unix Timestamp Converter

Convert Unix timestamps to human-readable dates and back. Supports seconds and milliseconds, 10 world timezones, relative time display, batch conversion, and code snippets.

How to use the timestamp converter

Paste a Unix timestamp (seconds or milliseconds) into the left field — the tool auto-detects the format and shows the human-readable date, relative time, and the same instant across 10 world timezones instantly.

To convert a date back to a timestamp, switch to the Date → Timestamp tab and use the datetime picker. Click Now to insert the current timestamp, or switch to the Batch tab to convert many timestamps at once — one per line.

The Code Snippets panel shows ready-to-copy code for your timestamp in JavaScript, Python, PHP, Go, and SQL. Share a specific timestamp by adding?ts=YOUR_TIMESTAMP to the page URL.

Features

  • Auto-detect format — 10-digit (seconds) and 13-digit (milliseconds) both work
  • Relative time — shows "3 days ago", "in 2 hours", etc.
  • 10 world timezone display — UTC, New York, LA, London, Paris, Dubai, Karachi, Tokyo, Shanghai, Sydney
  • Batch mode — paste multiple timestamps, get all results at once
  • Code snippets — JavaScript, Python, PHP, Go, SQL with your actual timestamp filled in
  • Date → Timestamp conversion — datetime picker to get the Unix value for any date
  • One-click "Now" button — insert the current timestamp
  • URL param pre-fill — share any timestamp via ?ts=
  • 100% private — all processing runs in your browser, nothing is transmitted

What is a Unix timestamp?

A Unix timestamp (also called Epoch time or POSIX time) is the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC. It is the standard way to represent a point in time in software systems — timezone-independent, unambiguous, and easy to store as a single integer.

Seconds vs milliseconds: Traditional Unix timestamps use seconds (10 digits). JavaScript’s Date.now() returns milliseconds (13 digits). This converter auto-detects which format you’re using based on the number of digits.

The Year 2038 problem: 32-bit systems store timestamps as a signed 32-bit integer with a maximum value of 2,147,483,647 — which corresponds to January 19, 2038. Modern 64-bit systems and JavaScript are not affected.

Frequently asked questions

What is a Unix timestamp?

A Unix timestamp is the number of seconds (or milliseconds) elapsed since January 1, 1970, 00:00:00 UTC — the Unix Epoch. It is the most common way to represent time in software because it is timezone-independent and unambiguous.

How do I convert a Unix timestamp to a readable date?

Paste your timestamp into the converter above. In code: new Date(ts * 1000) in JavaScript (for seconds), datetime.fromtimestamp(ts, tz=timezone.utc) in Python, or use the code snippets panel for PHP, Go, and SQL.

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

Count the digits. A 10-digit timestamp (e.g. 1700000000) is in seconds. A 13-digit timestamp (e.g. 1700000000000) is in milliseconds. JavaScript’s Date.now() returns milliseconds; most POSIX APIs and databases use seconds. This tool auto-detects the format.

What is the maximum Unix timestamp?

On 32-bit systems, the maximum signed integer is 2,147,483,647, which corresponds to January 19, 2038 — the famous Year 2038 problem. On 64-bit systems and in JavaScript, timestamps can represent dates far beyond that (up to year 275760 in JS).

How do I get the current Unix timestamp in code?

JavaScript: Math.floor(Date.now() / 1000) (seconds) or Date.now() (milliseconds). Python: int(time.time()). PHP: time(). Go: time.Now().Unix(). SQL: EXTRACT(EPOCH FROM NOW()) in PostgreSQL.

Can I convert multiple timestamps at once?

Yes. Switch to the Batch tab and paste one timestamp per line. The tool converts all of them simultaneously, showing seconds, ISO 8601, UTC string, and relative time for each entry.

Related tools