Convert between Unix timestamps and dates.
Enter a Unix timestamp in the top field and click Timestamp → Date to see the UTC, local, and ISO 8601 representations. Enter a date string in the bottom field and click Date → Timestamp to get seconds and milliseconds. Click Now to prefill the current local time.
A Unix timestamp (also called epoch time or POSIX time) is the number of seconds elapsed since January 1, 1970 at 00:00:00 UTC — known as the Unix epoch. It is the most widely used time representation in programming because it is timezone-independent, easy to store as a single integer, and simple to compare and do arithmetic with.
Example: the timestamp 1700000000 = November 14, 2023 at 22:13:20 UTC.
Most Unix APIs (C, Python, shell) use seconds. JavaScript's Date.now() and many modern APIs use milliseconds — the same moment as a milliseconds timestamp has 13 digits instead of 10. This tool auto-detects: values greater than 9,999,999,999 are treated as milliseconds.
// Current timestamp
const seconds = Math.floor(Date.now() / 1000); // e.g. 1700000000
const millis = Date.now(); // e.g. 1700000000000
// Timestamp → Date
const d = new Date(1700000000 * 1000);
console.log(d.toISOString()); // "2023-11-14T22:13:20.000Z"
console.log(d.toLocaleString()); // local time
// Date string → timestamp
const ts = Math.floor(new Date('2024-01-15T12:00:00Z').getTime() / 1000);
import time from datetime import datetime, timezone # Current timestamp ts = int(time.time()) # seconds ts_ms = int(time.time() * 1000) # milliseconds # Timestamp → datetime dt = datetime.fromtimestamp(1700000000, tz=timezone.utc) print(dt.isoformat()) # "2023-11-14T22:13:20+00:00" # datetime → timestamp ts = int(datetime(2024, 1, 15, 12, 0, 0, tzinfo=timezone.utc).timestamp())
Math.floor(Date.now() / 1000) for seconds. Python: int(time.time()). Unix shell: date +%s.1700000 seconds ≈ Jan 20, 1970, but 1700000000 seconds ≈ Nov 2023. Make sure you're using the right unit.2024-01-15T12:30:00Z. The Z suffix indicates UTC. It is sortable as a string and unambiguous, making it ideal for logs, APIs, and databases.