Blog / Tool Tips & Guides

What Is a Unix Timestamp, and How Do You Convert One?

By Abid · August 22, 2026

A Unix timestamp is a single number: the count of seconds since midnight UTC on the first of January 1970. 1,700,000,000 was in November 2023. The Unix Timestamp Converter goes both ways between the number and a readable date.

Why software prefers a number

A date written as text is ambiguous in ways a number never is. Is 03/04/2026 the third of April or the fourth of March? Which timezone? Was that before or after the clocks changed? Two text dates cannot be reliably compared or subtracted without first agreeing on all of that.

A timestamp has none of those problems. It carries no timezone, because it is an instant rather than a local time. Comparing two instants is comparing two integers. Finding the gap between them is subtraction. Sorting records by time is sorting numbers. Storing one takes a fixed, small amount of space.

The cost is that it means nothing to a human. 1,735,689,600 is a real moment and nobody can tell you which.

Seconds or milliseconds

The classic timestamp is in seconds. JavaScript, and therefore a great deal of web code, uses milliseconds - the same instant times a thousand.

Mixing them is the commonest bug here, and it is easy to spot. A ten-digit number is seconds; a thirteen-digit number is milliseconds. Feed milliseconds to something expecting seconds and you get a date fifty thousand years out. Feed seconds to something expecting milliseconds and you land in January 1970.

Reading one at a glance

Worth memorising two anchors. A timestamp beginning 17 is somewhere in the mid-2020s. One beginning 16 is roughly 2020 to 2023. And a timestamp of 0 is the epoch itself - if a record shows the first of January 1970, something failed to set the field rather than genuinely happening then.

Negative timestamps are legal and represent dates before 1970, though plenty of software handles them badly.

The 2038 problem

Stored in a signed 32-bit integer, a timestamp runs out on the 19th of January 2038, when the count exceeds what that type can hold and wraps to a negative number - 1901. It is the same shape of problem as the year 2000.

Modern systems use 64-bit integers and are fine for longer than the universe is likely to need. The risk sits in old embedded devices, legacy database columns and file formats that fixed the width decades ago. Anything storing a date that will still matter in 2038 is worth checking now.

Common questions

Does a timestamp include a timezone?

No. It is an instant in UTC. The timezone is applied only when displaying it.

Why do I get a different date than someone else from the same number?

Because you are displaying it in different timezones. The instant is the same.

Does it account for leap seconds?

No. Unix time pretends every day has exactly 86,400 seconds, which is a deliberate simplification.

How do I subtract two dates?

Convert both to timestamps and subtract. The result is seconds, which is why this is the easiest arithmetic in date handling.

Got a number to turn into a date?

Convert a Unix timestamp