Unix Timestamp — Epoch Time Explained
Free Online Unix Timestamp Converter
Convert Unix timestamps to human-readable dates and back. Supports seconds, milliseconds, and multiple timezones.
Open Unix Timestamp Converter →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, at 00:00:00 UTC. This reference point is called the Unix epoch.
Unix timestamp: 1704067200 Human readable: Monday, January 1, 2024, 00:00:00 UTC
The current Unix timestamp is always a large integer — around 1.7 billion for dates in 2024. It's a universal, timezone-independent way to represent a moment in time.
Why does Unix time start in 1970?
The Unix operating system was developed in the late 1960s and early 1970s at Bell Labs. When the developers needed to choose a starting point for their time system, they picked January 1, 1970 — a round number that was recent enough to be practical. It was an arbitrary but convenient choice that became the global standard.
Seconds vs milliseconds
You'll encounter two common formats:
| Format | Example | Precision | Common in |
|---|---|---|---|
| Seconds | 1704067200 | 1 second | Unix/Linux, databases, JWT (exp claim) |
| Milliseconds | 1704067200000 | 1 millisecond | JavaScript (Date.now()), Java, most APIs |
A quick way to tell them apart: if the number is 13 digits, it's milliseconds. If it's 10 digits, it's seconds. The timestamp converter handles both automatically.
How to get the current Unix timestamp in code
// Seconds Math.floor(Date.now() / 1000) // Milliseconds Date.now()
import time # Seconds int(time.time()) # Milliseconds int(time.time() * 1000)
-- Current timestamp in seconds SELECT EXTRACT(EPOCH FROM NOW())::INT; -- Convert timestamp to date SELECT TO_TIMESTAMP(1704067200);
-- Current Unix timestamp SELECT UNIX_TIMESTAMP(); -- Convert to datetime SELECT FROM_UNIXTIME(1704067200);
How to convert a Unix timestamp online
Paste any Unix timestamp (seconds or milliseconds) into the tinybench.dev timestamp converter to get the human-readable date and time in UTC and your local timezone. You can also convert in the other direction — enter a date and get the Unix timestamp back.
The Year 2038 problem
32-bit systems store Unix timestamps as a signed 32-bit integer, which has a maximum value of 2,147,483,647 — representing January 19, 2038, at 03:14:07 UTC. After this point, 32-bit systems will overflow and wrap around to a negative number (representing 1901).
Most modern systems use 64-bit timestamps, which won't overflow for approximately 292 billion years. The 2038 problem is mainly a concern for legacy embedded systems and old databases still using 32-bit storage.
Frequently asked questions
Try it now — free & private
Runs entirely in your browser. No sign-up, no uploads, no tracking.
Open Unix Timestamp Converter →