Unix Time Converter
Convert Unix timestamps (epoch time) to human-readable dates and vice versa. Supports seconds and millisecond timestamps.
Unix Time Converter
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Unix Timestamp = seconds since January 1, 1970 00:00:00 UTC
Worked example โ Unix 1000000000 = September 9, 2001 01:46:40 UTC
Formula
Unix Timestamp = seconds since January 1, 1970 00:00:00 UTC
Unix time counts the number of seconds elapsed since the Unix epoch (January 1, 1970, 00:00:00 UTC). Positive values represent dates after the epoch, negative values represent dates before it. Millisecond timestamps multiply by 1000 for sub-second precision.
Worked Examples
Example 1: Convert a Specific Timestamp
Problem:What date and time does Unix timestamp 1000000000 represent?
Solution:1,000,000,000 seconds after Jan 1, 1970 00:00:00 UTC = 11,574 days, 1 hour, 46 minutes, 40 seconds = September 9, 2001 01:46:40 UTC
Result:Unix 1000000000 = September 9, 2001 01:46:40 UTC
Example 2: Date to Unix Timestamp
Problem:Convert July 20, 1969 (Moon landing) to a Unix timestamp.
Solution:July 20, 1969 20:17:00 UTC is before the epoch Difference = -14,182,980 seconds Negative timestamps represent dates before Jan 1, 1970
Result:July 20, 1969 20:17:00 UTC = -14182980
Frequently Asked Questions
What is Unix time (epoch time)?
Unix time, also called epoch time or POSIX time, is a system for tracking time as a single number: the count of seconds that have elapsed since January 1, 1970 at 00:00:00 UTC, not counting leap seconds. This date is known as the Unix epoch. For example, a Unix timestamp of 1700000000 represents November 14, 2023 at 22:13:20 UTC. Unix time is widely used in programming, databases, and operating systems because it provides a simple, unambiguous, timezone-independent way to represent a moment in time.
What is the Year 2038 problem?
The Year 2038 problem is a computing limitation where systems storing Unix timestamps as 32-bit signed integers will overflow on January 19, 2038 at 03:14:07 UTC. At that point, the timestamp reaches 2,147,483,647 (the maximum 32-bit signed integer), and the next second would wrap around to a negative number, interpreted as December 13, 1901. Most modern systems have migrated to 64-bit timestamps, which will not overflow for approximately 292 billion years, effectively eliminating this concern.
What is the difference between Unix timestamps in seconds and milliseconds?
Standard Unix timestamps count seconds since the epoch and are typically 10 digits long (as of 2024). Millisecond timestamps multiply by 1000 to include fractional seconds, making them 13 digits long. JavaScript uses milliseconds by default with Date.now(), while languages like Python and PHP use seconds. Many APIs and databases accept both formats. This converter automatically detects whether your input is in seconds or milliseconds based on the digit count.
How do time zones affect Unix timestamps?
Unix timestamps are always in UTC and are not affected by time zones. A timestamp of 1700000000 represents the exact same moment worldwide, regardless of the local time zone. When you convert a Unix timestamp to a human-readable date, you must specify which time zone to display it in. This is why Unix timestamps are ideal for storing dates in databases that serve users across different time zones, as the conversion to local time happens at display time.
How does Unix time handle leap seconds?
POSIX time deliberately ignores them: every day is defined as exactly 86,400 seconds, so the count is not a true tally of elapsed seconds since 1970. When a leap second is inserted, the timestamp either repeats a value or is smeared across several hours by the time source, depending on the platform. That is why Unix time is unsuitable as a precision interval clock; systems needing that use TAI or a monotonic clock instead.
Why do some systems report a negative timestamp?
Because the epoch is a zero point, not a floor. Dates before 1 January 1970 UTC produce negative counts, so 31 December 1969 at 00:00:00 UTC is exactly -86400. Any library storing the value in a signed integer handles this correctly, but code assuming an unsigned type will wrap a historical date into the far future. Check the sign handling before storing dates that predate the epoch.
How do I convert a timestamp to a date by hand?
Divide the timestamp by 86,400. The whole part is the number of days since 1 January 1970, and the remainder is the seconds elapsed within that day, which you split into hours, minutes and seconds by dividing by 3600 and 60. Turning the day count into a calendar date means stepping through years and accounting for leap years, which is the tedious part a conversion routine automates.
What is the difference between a Unix timestamp and an ISO 8601 string?
A Unix timestamp is a single integer with no formatting and no time-zone information; it always denotes an instant in UTC. An ISO 8601 string such as 2024-05-01T12:00:00+02:00 is human-readable and carries an explicit offset. Timestamps sort and subtract trivially and take less storage, while ISO strings survive being read by a person and preserve the original local offset.
Should I store timestamps as integers or as a database timestamp type?
A 64-bit integer of epoch seconds is portable, compact and immune to time-zone misconfiguration, which suits event logs and APIs. A native timestamp-with-time-zone column gives you date arithmetic, indexing and range queries inside the engine. The mistake to avoid either way is a 32-bit column or a timestamp type without a zone: the first overflows in 2038, and the second silently reinterprets values when the server locale changes.
Why does a record sometimes display as 1 January 1970?
That is epoch zero rendering through, and it almost always means the timestamp field was empty, null, or an unparsed string that coerced to 0 rather than a genuine 1970 date. The same symptom appears when a millisecond value is divided instead of multiplied, or when a failed parse returns 0 instead of raising an error. Treat a 1970 date in production data as a missing-value bug, not a conversion result.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
โฐUnix Timestamp
Convert Epoch time to date
๐งฎTime Unit Converter
Calculate time unit converter with inputs, formulas, and instant results.
๐งฎMilitary Time Converter
Calculate military time converter with inputs, formulas, and instant results.
๐งฎTime Zones Converter
Calculate time zones converter with inputs, formulas, and instant results.
๐งฎAstronomical Time Converter
Calculate astronomical time converter with inputs, formulas, and instant results.
๐งฎNet Present Value Converter
Convert between present value, future value, and discount rate using time-value-of-money relationships.
๐งฎTorque Unit Converter
Calculate torque unit converter with inputs, formulas, and instant results.
๐งฎElectrical Resistance Converter (ฮฉ, kฮฉ, Mฮฉ)
Calculate electrical resistance unit converter with inputs, formulas, and instant results.