Invalid timestamp. Please enter a numeric Unix timestamp.
โ
โ
โ
โ
โ
โ
// 02 โ Date โ Epoch timestamp
โ
โ
โ
โ
Please check the values โ year (1970โ9999), month (1โ12), day (1โ31), hour (0โ23), min/sec (0โ59).
Or paste a date string:
Could not parse that date string.
Advertisement
// 03 โ Epoch range for year / month / day
โ
โ
โ
โ
// 04 โ Convert seconds to years, months, days, hours, minutes
86400 = 1 day ยท 604800 = 1 week ยท 2629800 = ~1 month ยท 31536000 = 1 year
// 05 โ Batch timestamp conversion
One timestamp per line. Paste from logs, databases, or APIs.
Advertisement
What is a Unix timestamp?
A Unix timestamp (also called epoch time, POSIX time, or Unix time) is the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC โ a reference point known as the Unix Epoch. It's a single integer, completely independent of timezones and daylight saving time.
Because it's just a number, timestamps are extremely efficient for databases to store, sort, and compare. You'll encounter them in API responses, server logs, JWT tokens, SQL databases, file system metadata, and virtually every modern software system.
Seconds vs milliseconds โ how to tell them apart
The most common source of confusion with Unix timestamps is the difference between seconds and milliseconds. This converter auto-detects the format based on digit count:
10 digits = seconds
Standard Unix time. Example: 1776422400. Used by most Unix/Linux systems, Python's time.time(), PHP's time(), and SQL's UNIX_TIMESTAMP().
13 digits = milliseconds
JavaScript's default. Example: 1776422400000. Used by Date.now(), Java's System.currentTimeMillis(), and most browser APIs.
16 digits = microseconds
Used in high-precision systems, some databases (PostgreSQL), and hardware timing. Example: 1776422400000000.
19 digits = nanoseconds
Used in Go's time.Now().UnixNano() and high-frequency trading systems. Example: 1776422400000000000.
Current timestamp in common programming languages
JavaScript / Node.js
Math.floor(Date.now() / 1000) or Date.now() for ms
Python
import time int(time.time())
PHP
time() or microtime(true)
SQL
MySQL: UNIX_TIMESTAMP() PostgreSQL: EXTRACT(EPOCH FROM NOW())
Go
time.Now().Unix() or .UnixMilli()
Java / Kotlin
Instant.now().getEpochSecond()
Frequently asked questions
What is the Unix Epoch and why is it January 1, 1970?
The date was chosen by early Unix developers at Bell Labs in the late 1960s as a convenient round number close to when Unix was being developed. It predates the widespread adoption of computers, making it a safe "zero point." The choice was somewhat arbitrary โ it just needed to be a fixed point in the past that was easy to work with.
What is the Year 2038 problem?
Systems that store Unix timestamps as a signed 32-bit integer can only represent values up to 2,147,483,647 โ which corresponds to January 19, 2038 at 03:14:07 UTC. After that point, the integer overflows to a large negative number. Modern systems use 64-bit integers, which can store timestamps until approximately the year 292 billion, effectively eliminating the problem.
Why does my converted timestamp show the wrong time?
Unix timestamps are always UTC-based. If your result is off by a fixed number of hours, you're likely confusing UTC with your local timezone. Use the timezone selector in the converter to display the time in your preferred timezone. Also check whether your timestamp is in seconds or milliseconds โ a millisecond timestamp interpreted as seconds will show a date in 1970.
Can Unix timestamps represent dates before 1970?
Yes. Negative Unix timestamps represent dates before January 1, 1970. For example, -86400 represents December 31, 1969. Most modern systems and languages support negative timestamps, though some older systems do not.
Do Unix timestamps account for leap seconds?
No. Unix time deliberately ignores leap seconds โ every day is treated as exactly 86,400 seconds. This means Unix time is not a true representation of UTC, but it makes arithmetic much simpler. In practice, this difference (about 27 seconds as of 2024) is negligible for most applications.