What Is a Unix Timestamp? A Developer's Guide
August 13, 2026 5 min read

What Is a Unix Timestamp? A Developer's Guide

A Unix timestamp counts seconds since 1970. Learn what it is, why computers use it, and how to convert one to a real date.

A Unix timestamp is simply the number of seconds that have passed since midnight on 1 January 1970, in UTC. It looks like a long number such as 1735689600, and it is how most computers, databases and APIs store a moment in time behind the scenes.

Why computers count from 1970

That starting point — called the "Unix epoch" — was chosen by the creators of the Unix operating system as a simple, universal zero. Storing time as one plain number makes it easy to compare, sort and do maths on dates without worrying about time zones or calendar quirks.

Seconds vs. milliseconds

There is one common source of confusion worth knowing:

UnitTypical length
Seconds10 digits (used by most systems).
Milliseconds13 digits (used by JavaScript).

Where you will meet timestamps

  • Log files that record exactly when an event happened.
  • Database fields storing "created" and "updated" times.
  • API responses that return dates as numbers.
  • Tokens like JWTs, which use timestamps for expiry.

The year 2038 problem

Older systems store timestamps in a 32-bit number that runs out in January 2038. Modern 64-bit systems have effectively unlimited range, so it is a known but largely solved issue.

Convert a timestamp instantly

Raw timestamps are unreadable to humans, so a converter is essential. Our Unix timestamp converter turns any timestamp into a local and UTC date and back again, and to measure the gap between two dates the date difference calculator does the rest. For the full history and technical detail, Wikipedia's article on Unix time is a thorough reference. Once you recognise the pattern, that long number stops being a mystery.

Tools mentioned in this article

More articles