Unix Timestamp Converter
Convert Unix timestamps to human-readable dates and vice versa. Shows a live current timestamp.
How to Use
Enter a Unix timestamp
Paste a 10-digit (seconds) or 13-digit (milliseconds) timestamp number to convert to a readable date.
View UTC and local time
See the timestamp's equivalent date in both UTC and your device's local timezone.
Convert a date to timestamp
Enter a date and time to get back its Unix timestamp in seconds or milliseconds.
Use the live ticker
See the current Unix timestamp ticking in real time for debugging or quick timestamp capture.
The POSIX Unix Epoch Standard: Leap Second Slewing and the Year 2038 Problem
The Unix timestamp (also known as POSIX time or Epoch time) represents the universal backbone of computing infrastructure. Defined in IEEE Std 1003.1 (POSIX), it measures the number of seconds that have elapsed since Thursday, January 1, 1970 00:00:00 UTC, excluding leap seconds. Because it provides a single, monotonically increasing integer, it is utilized across relational databases, distributed message brokers, REST APIs, and filesystem metadata.
Leap Seconds and POSIX Time Slewing
Due to tidal friction from the Moon and core mantle interactions, Earth's rotational speed fluctuates irregularly. To keep atomic clocks (International Atomic Time, TAI) synchronized with Earth's physical rotation (Universal Time, UT1), the International Earth Rotation and Reference Systems Service (IERS) periodically inserts leap seconds.
The POSIX specification intentionally handles leap seconds by ignoring them in the integer count. When a positive leap second occurs (such as 23:59:60 UTC on December 31, 2016), Unix time repeats second 1483228800 or slews clock drift across milliseconds (such as Google NTP leap smear), ensuring every civil day contains exactly 86,400 Unix seconds.
The Year 2038 Problem (Y2038 / Unix Millennium Bug)
In legacy 32-bit operating systems, embedded systems, and database engines (like MySQL 32-bit TIMESTAMP types), time is stored as a signed 32-bit integer (int32):
| Epoch Value | Binary Hex Representation | Calendar Date & Time (UTC) | Significance & Architectural State |
|---|---|---|---|
| 0 | 0x00000000 | 1970-01-01 00:00:00 UTC | The Unix Epoch origin point. |
| 2,147,483,647 | 0x7FFFFFFF | 2038-01-19 03:14:07 UTC | Maximum signed 32-bit value. 32-bit clocks overflow here! |
| -2,147,483,648 | 0x80000000 | 1901-12-13 20:45:52 UTC | Integer overflow: unpatched systems jump backward 137 years. |
| 64-bit Max | 0x7FFFFFFFFFFFFFFF | 292,277,026,596 AD | Signed 64-bit headroom spans ~292 billion years (past the heat death of the universe). |
Seconds vs. Milliseconds in Web Programming
When debugging APIs and frontend web applications, developers frequently encounter timestamp magnitude confusion:
- 10 Digits (Seconds): Standard Unix epoch (e.g.,
1761453600). Used by Linux, C/C++, Pythontime.time(), PHPtime(), Go, and Redis. - 13 Digits (Milliseconds): JavaScript epoch (e.g.,
1761453600000). Returned by JavaScriptDate.now()and JavaSystem.currentTimeMillis().
Passing a 10-digit second timestamp to new Date(ts) in JavaScript will interpret the date as being in January 1970 because it lacks the three trailing millisecond zeros.
Real-World Examples & Use Cases
API Debugging and Development
REST APIs, JSON responses, and webhook payloads commonly include Unix timestamps in the data fields for event times, expiry dates, and last-modified markers. When debugging API responses in DevTools, Postman, or log viewers, developers need to convert these numeric epoch values to understand whether an event happened recently, whether a token has expired, or whether a timestamp makes logical sense in the flow. Converting 1705238400 to 'January 14, 2024 16:00 UTC' immediately clarifies the timeline.
Database Timestamp Interpretation
Relational databases (MySQL, PostgreSQL) and NoSQL stores (MongoDB, Redis) often store dates as Unix timestamps in integer columns. Database administrators and developers querying logs, analytics data, and event tables encounter epoch timestamps in query results. Translating these to readable dates helps interpret data correctly: was an order placed last week or last year? Did a cache entry expire before or after the incident? PostgreSQL's to_timestamp() function and MySQL's FROM_UNIXTIME() perform server-side conversion, but a browser tool is faster for quick checks.
Authentication Token Expiry Verification
JWT (JSON Web Token) authentication tokens include an 'exp' (expiration) claim as a Unix timestamp. Security engineers and developers debugging authentication errors decode the JWT payload and examine the exp value to determine when the token expires or expired. A 'Token Expired' error that references a numeric timestamp like 1705238000 becomes immediately understandable when converted: 'This token expired 6 hours ago.' Similarly, cookie expiry values, session tokens, and OAuth access token validity periods are often expressed as epoch timestamps.
Log File Analysis and Incident Investigation
Application logs, web server access logs, system audit logs, and security event logs often use Unix timestamps for compact, sortable, language-neutral event timing. During incident investigations, interpreting log entries requires converting timestamps to understand event sequences: what user action happened first, what happened after, and how long elapsed between events. Unix timestamps sort naturally as integers (earlier events = smaller numbers), making them ideal for log storage, but human-unreadable for analysis without conversion.
How It Works
Unix Epoch Time: Definition: Unix timestamp = seconds elapsed since January 1, 1970 00:00:00 UTC (The Unix epoch, or Unix time zero) Common scales: Seconds (most common): 10-digit numbers (e.g. 1705238400) Milliseconds (JavaScript): 13-digit numbers (e.g. 1705238400000) Microseconds: 16-digit numbers (used in high-precision logging) Conversion formulas: Timestamp to Date: new Date(timestamp × 1000) // if in seconds new Date(timestamp) // if in milliseconds .toISOString() → '2024-01-14T16:00:00.000Z' Date to Timestamp: new Date('2024-01-14T16:00:00Z').getTime() / 1000 (seconds) new Date('2024-01-14T16:00:00Z').getTime() (milliseconds) Current timestamp: Math.floor(Date.now() / 1000) // current Unix time in seconds Remarkable dates: Epoch zero: 0 = 1970-01-01 00:00:00 UTC Y2K38 problem: 2,147,483,647 = 2038-01-19 03:14:07 UTC (max value for signed 32-bit integer) Current: ~1.7 billion (Jan 2024)
Frequently Asked Questions
Why do some timestamps have 13 digits instead of 10?▼
What is the Year 2038 problem?▼
Does Unix time account for leap seconds?▼
How do I convert a Unix timestamp in Python and JavaScript?▼
What timezone is a Unix timestamp in?▼
Related Tools
Explore other tools in this category.
Age Calculator
Calculate your exact age in years, months, and days based on your date of birth.
Age in Days & Hours
Find exactly how old you are in years, months, weeks, days, hours, and minutes.
Countdown Timer
Set a custom countdown with hours, minutes, and seconds. Pause, resume, and use quick presets.
Timezone Converter
Convert any date and time between world timezones. Includes a live clock mode and multi-zone comparison.
Date Difference Calculator
Find the exact chronological difference in years, months, and days between two historical or future dates.
Days Between Dates
Calculate the total absolute number of days between two dates.