Developer guide

Unix Timestamp Explained

A Unix timestamp is a compact numeric way for systems to represent time. This guide explains epoch time, seconds vs milliseconds, UTC vs local display, and when to use readable ISO 8601 dates instead.

Quick answer

A Unix timestamp is a number that represents a moment in time by counting from the Unix epoch: January 1, 1970 at 00:00:00 UTC. Many systems store Unix time in seconds, while JavaScript and analytics workflows often use milliseconds. Use the Timestamp Converter when you need to inspect a value, but always confirm the unit and display timezone before relying on the readable date.

Inspect a Unix timestamp

Who this guide is for

Primary keyword: Unix timestamp explained. Search intent: someone sees a numeric date in an API, log, database row, JWT claim, analytics export, or debugging tool and wants to understand what the number means before converting or documenting it.

This article explains the concept. For a step-by-step conversion workflow, use Convert Unix Timestamp Online or open the Timestamp Converter directly.

What is a Unix timestamp?

A Unix timestamp is a numeric time value used by operating systems, programming languages, databases, APIs, logs, and analytics platforms. Instead of writing a date like June 1, 2024, it stores a count from a fixed starting point called the Unix epoch.

The epoch is 1970-01-01 00:00:00 UTC. A timestamp after that moment is usually a positive number. The larger the number, the later the moment.

Example Unix timestamp values
0                  -> Unix epoch start
1717243200         -> likely seconds
1717243200000      -> likely milliseconds

What is the Unix epoch?

The Unix epoch is the reference point used by Unix time. It is not a timezone chosen by your laptop or browser; it is defined at midnight UTC on January 1, 1970.

When a system stores a Unix timestamp, it can compare, sort, and calculate time intervals without carrying a long human-readable date string. That is useful for computers, but it can be confusing for people until the value is converted.

Seconds vs milliseconds

The most common timestamp mistake is using the wrong unit. A Unix timestamp may count seconds or milliseconds depending on the system that produced it.

ExampleCommon meaningWhere you may see it
1717243200SecondsUnix-style tools, many APIs, JWT NumericDate claims, backend logs
1717243200000MillisecondsJavaScript Date values, browser logs, analytics exports, event tracking data
1717243200000000Microseconds in some systemsHigh-resolution database, tracing, or observability tools

A 10-digit value is often seconds and a 13-digit value is often milliseconds. Treat that as a strong clue, not a rule. The source API, database column, log format, or documentation should decide the unit.

Where Unix timestamps appear

  • APIs: Fields such as created_at, updated_at, expires_at, event_time, or numeric Unix fields may appear in responses.
  • Logs: Server logs, JSON logs, queue messages, and observability exports often use compact numeric time values.
  • Databases: Some tables store created, updated, deleted, or event time fields as numeric epoch values.
  • JWT claims: Claims such as exp, iat, and nbf are commonly represented as NumericDate values, usually seconds.
  • Analytics exports: Event tracking and product analytics data may use milliseconds or another documented precision.

When the timestamp appears inside JSON, use the JSON Formatter to inspect the surrounding field names. When it appears inside a JWT, use the JWT Decoder for decode-only inspection and avoid treating decoded claims as verified trust.

Why the same timestamp can show different local times

A Unix timestamp represents a single moment. When that moment is displayed as a readable date, the output can be shown in UTC or converted into a local timezone. That is why one timestamp may display as different clock times for different users.

For example, a moment displayed as afternoon UTC may appear as evening in Jakarta and morning in parts of the Americas. The timestamp did not change; the display timezone changed.

Unix timestamp vs ISO 8601

Unix timestamps are compact and easy for systems to compare. ISO 8601 date strings are easier for humans to read and can include timezone information directly in the string.

FormatExampleBest use
Unix timestamp1717243200Compact machine-readable storage, sorting, calculations
Unix milliseconds1717243200000JavaScript and event tracking workflows
ISO 86012024-06-01T12:00:00ZReadable documentation, API examples, support tickets, human review

Mini rule: use Unix timestamps when systems need compact numeric time values, and use ISO 8601 when humans need readable date/time strings with clearer timezone context.

Mini decision rule

  • Use Unix timestamps when systems need compact numeric time values.
  • Use ISO 8601 when humans need readable date/time strings.
  • Always confirm seconds vs milliseconds before converting or comparing values.
  • Always confirm whether readable output is UTC, local time, or source-system time.
  • Do not use converted output alone for critical deadlines without checking the source system.

Best practices when working with Unix timestamps

  • Document whether a timestamp field is seconds, milliseconds, microseconds, or another precision.
  • Include timezone context when showing readable dates to another person.
  • Prefer ISO 8601 for human-facing documentation when possible.
  • Treat copied logs, JWTs, API payloads, internal records, tokens, and customer data as potentially sensitive.
  • Use the correct parser or tool for the system you are debugging.
  • Verify critical scheduling, legal, financial, medical, compliance, or billing dates with the system of record.

If a timestamp is URL-escaped in a query string, the URL Encoder Decoder can help inspect the value before you convert it. For more tools, browse the Developer Tools directory.

Privacy and accuracy notes

TextBases tools are built for quick browser-based, no-login developer workflows where practical. Still, you should avoid pasting confidential logs, private customer data, live tokens, internal event records, API keys, credentials, or sensitive personal information unnecessarily.

Timestamp conversion helps explain and inspect time values. It does not validate business rules, timezone policies, source-system accuracy, compliance dates, legal deadlines, or production scheduling behavior.

FAQ

What is a Unix timestamp?

A Unix timestamp is a number that represents a moment in time by counting from the Unix epoch, usually January 1, 1970 at 00:00:00 UTC.

What is the Unix epoch?

The Unix epoch is the starting reference point for Unix time: 1970-01-01 00:00:00 UTC. Unix timestamps count forward from that moment.

Is a Unix timestamp in seconds or milliseconds?

It depends on the system. Many Unix-style and backend systems use seconds, while JavaScript and analytics workflows often use milliseconds. Confirm the unit before converting.

Why do timestamps use UTC?

UTC gives systems a shared reference point for storing and comparing moments. Readable local time can be calculated later based on timezone context.

What is the difference between Unix timestamp and ISO 8601?

A Unix timestamp is a compact numeric value, while ISO 8601 is a readable date/time string such as 2024-06-01T12:00:00Z. ISO 8601 is often better for human-facing documentation.

Why does the same timestamp show different local times?

The timestamp represents one moment, but readable display changes by timezone. UTC, Jakarta time, London time, and New York time can show different clock values for the same timestamp.