What is a Unix timestamp?

A Unix timestamp counts the number of seconds elapsed since January 1, 1970 at 00:00:00 UTC, also called the Unix epoch. It is timezone-independent: 1749649920 refers to the same instant everywhere in the world, regardless of local time.

This makes it ideal for storing dates in databases, logging events, and computing time differences without timezone confusion.

Seconds vs milliseconds

This tool auto-detects: if the number is larger than 1 000 000 000 000 (13 digits), it's treated as milliseconds; otherwise as seconds.

SecondsMost Unix systems and APIs, JWT exp/iat claims
MillisecondsJavaScript's Date.now() and most browser APIs
NanosecondsNode.js performance timers

Common use cases

Backend developers use Unix timestamps in JWT exp claims to set token expiration, in database records for created_at and updated_at fields, and in logs for unambiguous event ordering.

Frontend developers convert timestamps to local strings for display and compute relative times ("3 hours ago") for activity feeds. The ISO 8601 format (2026-06-11T14:32:00Z) is the standard for APIs and is sortable as a string.

Frequently asked questions

Anything typed as pure digits (with an optional leading minus) is compared against one cutoff: 1,000,000,000,000. Below it, the number is treated as seconds; at or above it, as milliseconds. That split holds up in practice because a seconds-based timestamp won't reach 13 digits until roughly the year 33,658, while a milliseconds-based timestamp for any recent date already exceeds it.