The basic definition
Unix time counts the number of seconds that have elapsed since midnight UTC on January 1, 1970 — a fixed reference point called the Unix epoch. Instead of storing a moment as a year, month, day, hour, minute, and second, systems that use Unix time store it as one single, ever-increasing number, which is simpler to store, compare, and do math on than a formatted date string.
Why systems prefer a single number over a formatted date
A formatted date is genuinely ambiguous without extra context — is 03/04/2026 March 4th (US convention) or April 3rd (most of the rest of the world)? A Unix timestamp has no such ambiguity: it's one specific, unambiguous number that means exactly one moment in time, universally, regardless of the reader's local date-formatting convention. It's also trivial to calculate a duration between two timestamps (just subtract) or check chronological order (just compare), operations that are notably fiddlier with formatted date strings.
Seconds vs. milliseconds: the most common mix-up
Traditional Unix/POSIX systems and most server-side APIs count in seconds, but JavaScript's own Date.now() and many web APIs count in milliseconds — a thousand times more granular. Treating a millisecond timestamp as though it were seconds (or vice versa) is one of the most common timestamp bugs: a millisecond value misread as seconds resolves to a date tens of thousands of years in the future, which is usually the immediate giveaway that the unit was mixed up somewhere in the pipeline.
Convert a timestamp now
Local time vs. UTC when converting
A Unix timestamp itself has no time zone attached — it's a single, global count. Converting it into a readable date requires choosing a time zone to display it in, and mixing up local time and UTC is a second common source of confusion, since a timestamp that looks "wrong" is often just displayed in the wrong time zone rather than actually incorrect. Server logs and API documentation are conventionally in UTC, so it's worth checking both when debugging a timestamp that doesn't match what you expected.