Convert Timestamp to Date — Free Online Tool

This free tool lets you instantly convert any Unix timestamp to a human-readable date and time. Enter a timestamp in seconds or milliseconds — the format is detected automatically. All processing happens in your browser with no data sent to any server.

How Timestamp to Date Conversion Works

A Unix timestamp counts the total number of seconds elapsed since January 1, 1970 at 00:00:00 UTC. Converting it to a calendar date involves three steps:

  1. Divide by 86400 — since there are 60 × 60 × 24 = 86400 seconds per day — to get the number of whole days since the epoch.
  2. Add the days to January 1, 1970 to get the calendar date.
  3. Use the remainder (timestamp mod 86400) to compute hours, minutes, and seconds within that day, then apply a timezone offset if needed.

For millisecond timestamps (13 digits), divide by 1000 first to obtain the second-precision value, then apply the same formula.

Conversion Examples

Unix TimestampUTC DateNotes
0Thu, 01 Jan 1970 00:00:00 UTCUnix epoch start
86400Fri, 02 Jan 1970 00:00:00 UTCFirst full day
1000000000Sat, 09 Sep 2001 01:46:40 UTC1 billion seconds
1234567890Fri, 13 Feb 2009 23:31:30 UTCRepunit timestamp
1500000000Fri, 14 Jul 2017 02:40:00 UTC1.5 billion seconds
1609459200Fri, 01 Jan 2021 00:00:00 UTCNew Year 2021
1700000000Wed, 14 Nov 2023 22:13:20 UTC1.7 billion seconds
1735689600Wed, 01 Jan 2025 00:00:00 UTCNew Year 2025
2000000000Sat, 18 May 2033 03:33:20 UTC2 billion seconds
2147483647Tue, 19 Jan 2038 03:14:07 UTCY2K38 — 32-bit max

Current Unix Timestamp

1776195270

Free — No Limits, No Signup

Convert

or

Results

UTC Time
Local Time
ISO 8601
Relative Time
Unix (seconds)
Unix (milliseconds)
Day of Week
Day of Year
Week Number
Is DST

Timestamp to Date in Code

JavaScript

const ts = 1700000000;

// Convert to UTC string
new Date(ts * 1000).toUTCString();
// "Wed, 14 Nov 2023 22:13:20 GMT"

// Convert to ISO 8601
new Date(ts * 1000).toISOString();
// "2023-11-14T22:13:20.000Z"

Python

from datetime import datetime

ts = 1700000000

# UTC date (naive)
datetime.utcfromtimestamp(ts)
# datetime(2023, 11, 14, 22, 13, 20)

# Local date
datetime.fromtimestamp(ts)

PHP

$ts = 1700000000;

// Local date
date('Y-m-d H:i:s', $ts);
// "2023-11-14 ..."

// UTC date
gmdate('Y-m-d H:i:s', $ts);
// "2023-11-14 22:13:20"

Common Pitfalls

Pitfall 1: Seconds vs Milliseconds

Forgetting to multiply by 1000 in JavaScript is the most common mistake. Passing a seconds timestamp directly to new Date(ts) without multiplying produces a date around the year 47000 — far in the future.

Pitfall 2: Timezone Confusion

new Date(ts * 1000).toString() returns local time, which varies by machine. Use .toUTCString() or .toISOString() for a consistent UTC result.

Pitfall 3: Daylight Saving Time

When converting to local time, the UTC offset can shift by ±1 hour depending on DST rules in your timezone. If you need a stable, reproducible result, always work in UTC.

Frequently Asked Questions

How do I convert a Unix timestamp to a date?

In JavaScript: new Date(ts * 1000).toUTCString() converts a Unix timestamp in seconds to a UTC date string. In Python: datetime.fromtimestamp(ts) or datetime.utcfromtimestamp(ts) for UTC.

What is a Unix timestamp?

A Unix timestamp is the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC. It is also known as Unix time, POSIX time, or epoch time.

Why multiply by 1000 when converting timestamp to date in JavaScript?

JavaScript expects milliseconds, not seconds. Unix timestamps are in seconds, so you must multiply by 1000 before passing to new Date(). Forgetting this step gives a date around the year 47000.

What timezone is used when converting a timestamp to a date?

Unix timestamps are always UTC by default. Using .toISOString() or .toUTCString() in JavaScript returns UTC. Local time depends on the system timezone and may differ from UTC.

What is the difference between a 10-digit and 13-digit timestamp?

A 10-digit timestamp (e.g. 1700000000) represents seconds. A 13-digit timestamp (e.g. 1700000000000) represents milliseconds. Date.now() in JavaScript returns milliseconds; most other languages return seconds.

How do I convert a negative timestamp?

Negative Unix timestamps represent dates before January 1, 1970. For example, -1 corresponds to December 31, 1969 at 23:59:59 UTC. JavaScript and Python both handle negative values correctly with the same conversion formulas.

How accurate is timestamp to date conversion?

Conversion is exact to the second for second-precision timestamps, and exact to the millisecond for millisecond-precision timestamps. There is no rounding — the result is always deterministic.

Related Tools