Unix Timestamp Converter
Paste a Unix timestamp or any date — get all formats instantly. No dropdowns, no steps.
Accepts: Unix seconds (10-digit integer), milliseconds (13-digit integer), or any date string — e.g. 2024-05-20, May 20 2024, 2024-05-20T10:30:00Z
Date.now()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 — a fixed moment known as the Unix Epoch. It is always in Coordinated Universal Time (UTC), so it stays consistent regardless of where in the world a server is located.
For example, the timestamp 1716220800 always means May 20, 2024 at 08:00:00 UTC
— whether it's read in New York, London, or Tokyo. This makes Unix timestamps the universal language
for storing and comparing dates in software.
Seconds vs. Milliseconds
Two variants of Unix timestamps are in common use:
- Seconds — 10-digit integer (e.g.
1716220800). Used by Unix/Linux, POSIX APIs, Python'stime.time(), PHP'stime(), and most backend databases. - Milliseconds — 13-digit integer
(e.g.
1716220800000). Used by JavaScript'sDate.now(), Java'sSystem.currentTimeMillis(), and most browser and mobile APIs.
This converter auto-detects the unit: a 10-digit integer is treated as seconds; 12+ digits as milliseconds.
How to Convert Timestamps in Code
JavaScript
Python
PHP
SQL (PostgreSQL)
The Year 2038 Problem (Y2K38)
Many legacy systems store Unix timestamps as a 32-bit signed integer. The maximum
value for a 32-bit signed integer is 2,147,483,647, which corresponds to
January 19, 2038 at 03:14:07 UTC. One second after that, the integer rolls over to
a large negative number — causing date calculations to break on affected systems.
Modern systems use 64-bit integers, which pushes the overflow point to roughly the year 292 billion. Most current Linux kernels, databases, and programming languages are already safe.
ISO 8601 vs. RFC 2822
ISO 8601
The international standard for date/time strings. The UTC form ends in Z:
2024-05-20T08:00:00.000Z. The local form includes an offset:
2024-05-20T13:00:00+05:00. ISO 8601 strings sort lexicographically (alphabetically =
chronologically), making them ideal for filenames, database keys, and APIs.
RFC 2822
Used in email Date: headers, HTTP Date headers, and RSS/Atom feeds.
Example: Mon, 20 May 2024 08:00:00 +0000. More human-readable than ISO 8601 but more
verbose. Use ISO 8601 for data interchange and RFC 2822 only when a specific protocol requires it.