Unix Timestamp Converter
Convert Unix timestamps to human-readable dates and back. Auto-detects seconds vs milliseconds. Current timestamp updates live.
Current Unix timestamp
— seconds — ms Result
—
All formats
- Timestamp (s)
- —
- Timestamp (ms)
- —
- ISO 8601
- —
- UTC
- —
- Local (browser)
- —
- Relative
- —
- Day of week
- —
- Week of year
- —
Common questions
What is a Unix timestamp?
A Unix timestamp is the number of seconds that have elapsed since the Unix epoch — midnight UTC on January 1, 1970. It's a universal, timezone-independent way to represent a moment in time. Unix timestamps are used in databases, APIs, log files, JWT tokens, and virtually every programming language. They're sometimes called POSIX time, epoch time, or Unix time.
What is the difference between seconds and milliseconds timestamps?
Standard Unix timestamps count seconds since epoch. JavaScript's Date.now() and many web APIs return milliseconds (1/1000 of a second) — a 13-digit number. To convert: multiply seconds by 1000 to get milliseconds, or divide milliseconds by 1000 to get seconds. Example: 1700000000 (seconds) = 1700000000000 (milliseconds). This converter auto-detects which you've entered based on the number of digits.
What is the Unix epoch?
The Unix epoch is 00:00:00 UTC on Thursday, January 1, 1970 — timestamp 0. This date was chosen by the creators of Unix as a convenient starting point. Timestamps before this date are negative. The choice of 1970 was partly practical (recent enough to be useful) and partly arbitrary.
What is the Year 2038 problem?
Many older systems store Unix timestamps as a 32-bit signed integer, which can represent values up to 2,147,483,647 — corresponding to 03:14:07 UTC on January 19, 2038. After that moment, a 32-bit signed integer overflows to a large negative number, potentially causing software to misinterpret dates. Modern 64-bit systems don't have this problem — they can represent dates billions of years in the future.
What is ISO 8601 format?
ISO 8601 is the international standard for representing dates and times. Format: YYYY-MM-DDTHH:mm:ssZ or YYYY-MM-DDTHH:mm:ss+HH:MM. Example: 2024-01-15T14:30:00Z (Z means UTC). The T separates date from time, and the timezone offset is appended at the end. It's used in APIs, JSON, XML, and database fields because it's sortable as a string and unambiguous.
How do I get the current Unix timestamp in different languages?
JavaScript: Math.floor(Date.now() / 1000) for seconds, Date.now() for milliseconds. Python: import time; int(time.time()). PHP: time(). Unix shell: date +%s. Go: time.Now().Unix(). Java: System.currentTimeMillis() / 1000L. SQL (MySQL): UNIX_TIMESTAMP(). SQL (PostgreSQL): EXTRACT(EPOCH FROM NOW()).
Related tools
- Binary to Decimal Converter — convert between number bases
- Time Zone Calculator — convert time between any two time zones
- Age Calculator — exact age between any two dates