← Back to FreeTextUtils  · 

📅 Updated: June 1, 2026 | ⏱️ Reading time: 10 minutes | ✍️ By FreeTextUtils Team

What Is Unix Epoch Time?

Unix epoch time, also known as POSIX time or Unix timestamp, is a system for describing points in time as the number of seconds (or milliseconds) that have elapsed since 00:00:00 Coordinated Universal Time (UTC) on Thursday, January 1, 1970. This reference point is called the "Unix epoch."

The epoch system was chosen for its simplicity: time is represented as a single integer that increases by exactly one every second. This makes it trivial to store, compare, sort, and perform arithmetic on timestamps. Adding 86,400 to a Unix timestamp moves it forward by exactly one day (24 hours x 60 minutes x 60 seconds).

Epoch timestamps are the native time representation in virtually every operating system and programming language. Linux, macOS, and other Unix-based systems store file modification times as epoch seconds. JavaScript's Date object works with epoch milliseconds. Most databases store timestamps as epoch integers or use epoch-based internal representations. Understanding epoch time is essential for any developer who works with dates, logs, databases, or system administration.

How Epoch Timestamps Work

The epoch timestamp system is elegant in its simplicity:

  • Start point: January 1, 1970, 00:00:00 UTC = epoch 0
  • One second later: January 1, 1970, 00:00:01 UTC = epoch 1
  • One minute later: January 1, 1970, 00:01:00 UTC = epoch 60
  • One hour later: January 1, 1970, 01:00:00 UTC = epoch 3600
  • One day later: January 2, 1970, 00:00:00 UTC = epoch 86400
  • Current time (mid-2026): approximately epoch 1780000000

Seconds vs Milliseconds

There is an important distinction between seconds-based and milliseconds-based epoch timestamps:

  • Seconds (10 digits): Used by Linux/POSIX systems, Python, PHP, Ruby, Go, Rust
  • Milliseconds (13 digits): Used by JavaScript (Date.now()), Java (System.currentTimeMillis()), .NET (DateTimeOffset.ToUnixTimeMilliseconds)

Confusing the two results in dates off by a factor of 1000. Our epoch converter automatically detects whether your input is in seconds or milliseconds by checking the magnitude of the number.

Negative Timestamps

Dates before January 1, 1970 are represented as negative epoch values. For example, epoch -315619200 corresponds to January 1, 1960. The epoch converter handles these correctly, displaying the full date for any timestamp from 1901 to 2038 (32-bit range) or well beyond (64-bit).

Common Epoch Values Reference

Event Epoch (seconds) Human-Readable Date (UTC)
Unix epoch0January 1, 1970 00:00:00
First email62208000December 2, 1971
Y2K946684800January 1, 2000 00:00:00
iPhone launch1193875200June 29, 2007
COVID-19 pandemic1583020800March 1, 2020
Today (example)1780000000June 1, 2026 (approx)
Y2K38 (32-bit overflow)2147483647January 19, 2038 03:14:07
Year 21004102444800January 1, 2100 00:00:00

Converting Epoch to Human-Readable Date

Converting an epoch timestamp to a human-readable date involves these steps:

  1. Determine the unit: Check if the timestamp is in seconds (typically 10 digits for recent dates) or milliseconds (13 digits).
  2. Normalize to seconds: If the timestamp is in milliseconds, divide by 1000. If in seconds, leave as-is.
  3. Compute the date: Add the seconds to the epoch reference point (January 1, 1970 00:00:00 UTC).
  4. Format the output: Display the result in the desired format (UTC, ISO 8601, RFC 2822, or local time zone).

For example, to convert epoch 946684800:

Input: 946684800 (seconds since epoch)

Calculation: 946684800 seconds / 86400 = 10957 days since epoch

Result: January 1, 2000 00:00:00 UTC

ISO 8601: 2000-01-01T00:00:00Z

Converting a Date to an Epoch Timestamp

The reverse conversion — from a human-readable date to epoch — follows this process:

  1. Parse the date: Interpret the input date string according to its format (ISO 8601, RFC 2822, US date, etc.).
  2. Resolve the time zone: Determine if the time is in UTC, has an explicit offset, or is in local time.
  3. Compute the difference: Subtract the epoch reference point (January 1, 1970 00:00:00 UTC) from the parsed date.
  4. Output the result: Express the difference in seconds (for Unix/POSIX systems) or milliseconds (for JavaScript).

For example, to convert "July 20, 1969 20:17:40 UTC" (Apollo 11 moon landing):

Input date: July 20, 1969 20:17:40 UTC

Difference from epoch: This date is BEFORE the epoch, so the epoch value will be negative.

Epoch (seconds): -14182940

Epoch (milliseconds): -14182940000

Real-World Examples

Example 1: Investigating a Database Anomaly

Scenario: A database administrator notices that a table's created_at column contains the value 1740358407 for a critical record. They need to know exactly when this record was created.

Challenge: Reading raw epoch timestamps is impossible for humans. The administrator needs to convert every timestamp they investigate.

Solution: The administrator pastes 1740358407 into the epoch converter. The tool immediately shows it corresponds to February 23, 2025 at approximately 15:33:27 UTC. They now know the record was created in late February 2025, which helps them correlate it with other system events during that time period.

Example 2: JavaScript Timestamp Mismatch

Scenario: A front-end developer uses Date.now() (which returns epoch milliseconds) to generate timestamps and sends them to a backend API that expects epoch seconds.

Challenge: The backend stores timestamps that are consistently 1000x too large, resulting in dates in the year 50,000+.

Solution: The developer uses the epoch converter to verify their suspicion. They take Date.now() output (e.g., 1780000000000) and try it in both seconds and milliseconds mode. The converter clearly shows that treating it as seconds gives a date in the year 58,000+, while treating it as milliseconds gives the correct current date. They add a / 1000 to their API request code and add unit tests to prevent regression.

Example 3: Analyzing Server Log Timestamps

Scenario: A DevOps engineer is analyzing a security incident from server logs. The logs are in a custom format that records timestamps as epoch seconds. The engineer needs to correlate them with application logs that use ISO 8601 format.

Challenge: Manually cross-referencing timestamps between two different formats is slow and error-prone, especially under time pressure during an incident.

Solution: The engineer copies epoch timestamps from the server logs and pastes them into the epoch converter, getting the corresponding ISO 8601 dates instantly. They can now search the application logs for the exact time window of the incident. After the incident, they create a runbook that includes instructions for using the epoch converter during future investigations.

Frequently Asked Questions

Q: What is the Year 2038 problem?

A: On January 19, 2038 at 03:14:07 UTC, a 32-bit signed integer storing Unix time will overflow (reach 2,147,483,647). Systems using 32-bit time_t will wrap to December 13, 1901. All modern 64-bit systems are immune. If your software will still be in use by 2038, ensure it uses 64-bit time representations.

Q: How do I know if my timestamp is in seconds or milliseconds?

A: A timestamp for a current date is around 1.7 billion in seconds (10 digits) and 1.7 trillion in milliseconds (13 digits). If your timestamp is 10 digits, it is likely seconds. If 13 digits, it is milliseconds. Our converter automatically detects the unit.

Q: Do leap seconds affect epoch timestamps?

A: No. Unix epoch time ignores leap seconds. Each day is treated as exactly 86,400 seconds. When a leap second is inserted, the Unix timestamp does not account for it — during that second, two different UTC times may map to the same Unix timestamp.

Q: What time zone does epoch time use?

A: Epoch time is always UTC. There is no time zone information in an epoch timestamp. When converting to a human-readable date, you must specify the time zone (UTC or a local offset). Our converter shows both UTC and local time.

Q: Can I convert epoch timestamps from other programming languages?

A: Yes. Epoch timestamps are language-independent. Whether your timestamp comes from Python (time.time()), PHP (time()), Java (System.currentTimeMillis()), or any other language, our converter handles it. Just be aware of the seconds vs milliseconds difference.

Q: Why is January 1, 1970 the epoch reference?

A: The Unix epoch was chosen for the first edition of the Unix Programmer's Manual in 1971, using January 1, 1971 initially. It was later adjusted to January 1, 1970 for simpler calculations. The number of years in the range of a 32-bit signed integer (about 68 years) was also a practical consideration.

Ready to Convert Epoch Timestamps?

Use our free online epoch converter to transform Unix timestamps to readable dates instantly:

  • Convert epoch seconds to human-readable dates
  • Convert epoch milliseconds (JavaScript/Java format)
  • Convert dates back to epoch timestamps
  • Automatic detection of seconds vs milliseconds
  • 100% browser-based, no data leaves your device
Go to Epoch Converter Tool