← Back to FreeTextUtils  · 

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

What Is a Timestamp?

A timestamp is a sequence of characters or encoded data that represents when a certain event occurred. Timestamps are fundamental to computing: they appear in log files, database records, API responses, file metadata, email headers, and virtually every system that records when something happened. Understanding timestamp formats and how to convert between them is an essential skill for developers, system administrators, data analysts, and anyone who works with time-based data.

Timestamps come in many formats, from human-readable date strings like "June 1, 2026" to machine-oriented numeric values like "1780000000" (a Unix timestamp). Each format serves a different purpose: humans prefer readable dates, machines prefer numeric precision, and standards bodies have defined formats like ISO 8601 for unambiguous interchange between systems.

Common Timestamp Formats

Format Example Use Case
Unix timestamp (seconds)1780000000System time, databases, APIs
Unix timestamp (milliseconds)1780000000000JavaScript Date, high-precision APIs
ISO 86012026-06-01T12:00:00ZAPI interchange, data serialization
RFC 2822Mon, 01 Jun 2026 12:00:00 +0000Email headers, HTTP dates
RFC 33392026-06-01T12:00:00+00:00Profile of ISO 8601 for internet
US date format06/01/2026Human-readable (US)
European date format01/06/2026Human-readable (EU)
Log file format2026-06-01 12:00:00Application and server logs

Unix Timestamp (Epoch Time)

The Unix timestamp is the number of seconds (or milliseconds) that have elapsed since January 1, 1970 00:00:00 UTC (the Unix epoch), excluding leap seconds. It is a simple integer that is easy to store, compare, and compute with. Most programming languages use Unix timestamps as their native date/time representation.

ISO 8601

ISO 8601 is the international standard for date and time representation. Its format is YYYY-MM-DDTHH:mm:ss.sssZ where T separates the date from the time, and Z indicates UTC time (or you can use a time zone offset like +02:00). ISO 8601 is unambiguous across locales: 2026-06-01 is always June 1, never January 6.

RFC 2822 / RFC 5322

RFC 2822 is the standard format for dates in email headers (like Date: and Received:). It includes the day of the week, date, time, and time zone. Example: Mon, 01 Jun 2026 12:00:00 +0000. This format is also used in HTTP headers (Date, Last-Modified).

Unix Timestamp Deep Dive

The Unix timestamp system is elegant in its simplicity but has important nuances:

Seconds vs Milliseconds

Many systems use seconds-based Unix timestamps (10 digits). JavaScript, however, uses milliseconds (13 digits). Our tool supports both, automatically detecting the precision based on the input. Always check which unit your system uses to avoid off-by-factor-1000 errors.

The Year 2038 Problem

On January 19, 2038 at 03:14:07 UTC, 32-bit signed integers will overflow for Unix timestamps. Systems still using 32-bit time_t will wrap to December 13, 1901. All modern 64-bit systems are unaffected (they handle times billions of years into the future), but embedded systems and legacy code need attention.

Negative Timestamps

Timestamps before January 1, 1970 are represented as negative numbers. For example, -315619200 corresponds to January 1, 1960. Our converter handles negative timestamps correctly.

Leap Seconds

Unix timestamps do not account for leap seconds. The Unix epoch treats each day as exactly 86,400 seconds, while actual astronomical days vary slightly. This discrepancy is handled by inserting leap seconds into UTC, but the Unix timestamp simply ignores them (the same timestamp can correspond to two different UTC times during a leap second).

ISO 8601: The Standard for Data Interchange

ISO 8601 is the preferred format for API responses, configuration files, and data serialization because it is unambiguous, human-readable, and machine-parseable. Key features:

Date Component

YYYY-MM-DD — four-digit year, two-digit month, two-digit day. Always zero-padded. This ordering enables alphabetical sorting to equal chronological sorting.

Time Component

THH:mm:ss.sss — preceded by T, followed by hours (00-23), minutes, seconds, and optional fractional seconds.

Time Zone Indicator

  • Z — UTC (Zulu time)
  • +HH:mm — Positive offset from UTC
  • -HH:mm — Negative offset from UTC

Duration and Interval

ISO 8601 also defines formats for durations (P1Y2M3DT4H5M6S) and time intervals (2026-01-01/P1M), which are useful for scheduling and recurring events.

How to Convert Between Formats

Converting between timestamp formats involves these core operations:

Unix Timestamp to Human-Readable Date

  1. Parse the timestamp value (seconds or milliseconds)
  2. If in milliseconds, divide by 1000 to get seconds
  3. Add the seconds to the Unix epoch (January 1, 1970 00:00:00 UTC)
  4. Format the resulting date/time in the desired output format

Human-Readable Date to Unix Timestamp

  1. Parse the date string according to its format
  2. Construct a date object from the parsed components
  3. Subtract the Unix epoch to get the difference in milliseconds
  4. Divide by 1000 to get seconds (or keep as milliseconds)

Between ISO 8601 and RFC 2822

These conversions require reorganizing the date components into the target format's structure. The time zone information must be preserved (or assumed as UTC if not specified). Our tool handles all of these conversions automatically, but understanding the format differences helps you interpret the results correctly.

Real-World Examples

Example 1: Debugging Application Logs

Scenario: A developer is investigating a production incident. The application logs timestamps in Unix milliseconds, but the developer needs to correlate them with server access logs that use ISO 8601.

Challenge: Manually converting timestamps between formats is error-prone and slow during an incident.

Solution: The developer uses the timestamp converter to paste millisecond timestamps from application logs and instantly get the corresponding ISO 8601 dates. They can now search the access logs for the exact same time window, quickly identifying the root cause of the issue.

Example 2: API Integration Between Systems

Scenario: Two systems need to exchange time-based data. System A uses Unix timestamps, System B uses ISO 8601 with time zone offsets.

Challenge: The teams need to verify their timestamp conversions are correct before deploying the integration.

Solution: During development, both teams use the timestamp converter to verify sample conversions. They test edge cases: midnight, time zone boundaries, daylight saving transitions, and timestamps near the epoch. The converter ensures both sides agree on the converted values before the integration goes live.

Example 3: Data Migration with Time Zones

Scenario: A company migrates data from a legacy system that stores dates in US Eastern Time (without time zone info) to a new system that requires UTC.

Challenge: Without time zone information in the source data, the conversion could shift dates by up to 5 hours. November 3 at 11:00 PM ET becomes November 4 at 3:00 AM UTC.

Solution: The team uses the timestamp converter to test conversion scenarios. They discover that the source system's "date only" fields (no time component) were implicitly midnight ET. The converter helps them verify the correct UTC values for each record type before running the full migration.

Frequently Asked Questions

Q: What is the difference between epoch and Unix timestamp?

A: "Epoch" refers to the reference point from which time is measured (January 1, 1970 for Unix). "Unix timestamp" is the specific measurement (seconds since epoch). These terms are often used interchangeably.

Q: Why are some timestamps 10 digits and others 13 digits?

A: 10-digit timestamps are in seconds. 13-digit timestamps are in milliseconds (common in JavaScript and Java). Always verify which unit your system uses.

Q: How do I handle time zones in conversions?

A: Convert everything to UTC first, then apply time zone offsets. Our tool assumes UTC for Unix timestamps and preserves time zone info from ISO 8601/RFC 2822 inputs.

Q: What happens on February 29 in a leap year?

A: Leap years (years divisible by 4, except century years not divisible by 400) include February 29. The Unix timestamp for February 28 23:59:59 to March 1 00:00:00 increments by 86,401 seconds (not 86,400) on leap days.

Q: Can I convert dates before 1970?

A: Yes, our converter handles dates before the Unix epoch. The timestamp will be negative, representing seconds before January 1, 1970. All formats are supported for historical dates.

Ready to Convert Timestamps?

Use our free online timestamp converter to transform dates between formats instantly:

  • Convert Unix timestamps to human-readable dates
  • Support for seconds and milliseconds
  • Convert between ISO 8601, RFC 2822, and RFC 3339
  • 100% browser-based processing
  • Copy results with one click
Go to Timestamp Converter Tool