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:
- Divide by 86400 — since there are
60 × 60 × 24 = 86400seconds per day — to get the number of whole days since the epoch. - Add the days to January 1, 1970 to get the calendar date.
- 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 Timestamp | UTC Date | Notes |
|---|---|---|
| 0 | Thu, 01 Jan 1970 00:00:00 UTC | Unix epoch start |
| 86400 | Fri, 02 Jan 1970 00:00:00 UTC | First full day |
| 1000000000 | Sat, 09 Sep 2001 01:46:40 UTC | 1 billion seconds |
| 1234567890 | Fri, 13 Feb 2009 23:31:30 UTC | Repunit timestamp |
| 1500000000 | Fri, 14 Jul 2017 02:40:00 UTC | 1.5 billion seconds |
| 1609459200 | Fri, 01 Jan 2021 00:00:00 UTC | New Year 2021 |
| 1700000000 | Wed, 14 Nov 2023 22:13:20 UTC | 1.7 billion seconds |
| 1735689600 | Wed, 01 Jan 2025 00:00:00 UTC | New Year 2025 |
| 2000000000 | Sat, 18 May 2033 03:33:20 UTC | 2 billion seconds |
| 2147483647 | Tue, 19 Jan 2038 03:14:07 UTC | Y2K38 — 32-bit max |
Current Unix Timestamp
1776195270
Convert
Results
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
Unix Timestamp Converter
Convert Unix timestamps to human-readable dates and back, instantly.
Epoch Converter
Convert epoch timestamps to human-readable dates and times.
Unix Timestamp
Learn about Unix timestamps and get the current value live.
Date to Timestamp
Convert dates and times into Unix timestamps.
Epoch Time
Explore epoch time history, standards, and real-world usage.
UTC Time Now
See the current UTC time live with a real-time clock.
Year 2038 Problem
Learn about the Y2K38 overflow and which systems are affected.
Seconds Since 1970
See how many seconds have elapsed since the Unix epoch.
Epoch Time to Date
Convert epoch time to a readable date with code examples in 6 languages.
Linux Timestamp to Date
Convert Linux/Unix timestamps to readable dates using command-line tools.
Unix Time to Date
Convert Unix time to a readable date with real-world examples and code.