Try the unix timestamp converter
Convert between Unix epoch timestamps and human-readable dates with timezone and precision controls.
What a Unix timestamp is
Unix timestamps count seconds since January 1, 1970, 00:00:00 UTC. They are the standard way computers represent time in logs, APIs, databases, and filesystems. One integer, one timezone (UTC), no ambiguity — which is why every non-trivial system eventually adopts them.
Why 1970
The zero point — the "epoch" — was set to the release date of Unix's third edition. It was arbitrary at the time and has been stuck ever since. Expect to see negative timestamps for moments before 1970; they are valid and well-defined.
Precision variants
Different systems store different resolutions:
- Seconds (
s) — classic Unix time. 10 digits through the year 2286. - Milliseconds (
ms) — JavaScript'sDate.now(), most web APIs. 13 digits today. - Microseconds (
µs) — database engines, high-resolution logs. 16 digits. - Nanoseconds (
ns) — Go'stime.UnixNano(), tracing systems. 19 digits.
Rule of thumb: a current 10-digit integer is seconds; a current 13-digit integer is milliseconds. The converter auto-detects based on magnitude, but if you're reading someone else's code, count the digits.
Timezones
The epoch is always UTC. There is no such thing as a "Pacific time Unix timestamp" — the number is the same everywhere. Timezone only enters when you render the timestamp as a human-readable date. That is a display choice, not a storage choice. Store UTC, render local.
The Y2K38 problem
32-bit signed integers overflow at 2147483647 — that is January 19, 2038, 03:14:07 UTC. Systems still using time_t as a 32-bit int will wrap to negative numbers and interpret the date as December 13, 1901. Most modern systems moved to 64-bit time_t years ago; embedded and legacy code is where this still bites.
Code examples
// JavaScript — current seconds
Math.floor(Date.now() / 1000)
# Python
import time
int(time.time())
# Shell
date +%s
-- PostgreSQL
SELECT EXTRACT(EPOCH FROM now())::bigint;
Landmark timestamps
| Timestamp | Date (UTC) | Note |
|--------------|---------------------|--------------------|
| 0 | 1970-01-01 00:00:00 | The epoch |
| 1000000000 | 2001-09-09 01:46:40 | First 10-digit |
| 1700000000 | 2023-11-14 22:13:20 | Recent landmark |
| 2147483647 | 2038-01-19 03:14:07 | Y2K38 overflow |
All conversion happens in your browser. Nothing is uploaded.