Unixdates

Epoch & Unix Timestamp Converter

Convert Unix timestamps to human-readable dates — fast and free.

The current Unix epoch time is

Seconds since 1970-01-01 00:00:00 UTC.

Convert timestamp to human date

Convert human date to timestamp

What is Unix epoch time?

Unix epoch time — also called Unix time, POSIX time, or a Unix timestamp — is a single number that represents a specific moment in physical time. It is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, not counting leap seconds. Almost every operating system, programming language, and database supports it natively, which is why it is the de facto standard for storing and exchanging timestamps between systems.

The number is timezone-agnostic on the wire: a server in Tokyo and a phone in Oslo recording the same instant will both produce the same Unix integer, even though the calendar clocks on either side read very different things. The conversion to a human-readable date only happens when something — a converter, a logging library, a date picker — applies a timezone and a calendar to render the number into year-month-day-hour-minute-second.

How this converter works

The tool above does three things, all entirely in your browser. Nothing you type leaves your device.

Picking the right unit: seconds, milliseconds, or microseconds?

The Unix specification says seconds, but different ecosystems have drifted. JavaScript's Date.now() returns milliseconds. PostgreSQL stores microseconds internally. Go's UnixNano() returns nanoseconds. When you copy a value from one system into another, the unit can shift — and the resulting "date" will be off by exactly a factor of 1,000.

The converter handles this for you. If you paste a 10-digit number, it assumes seconds. A 13-digit number is milliseconds. 16 digits is microseconds. 19 digits is nanoseconds. The ranges are wide enough that any real-world timestamp from the last 50 years and the next 50 years will be classified correctly.

For the deeper version of this — including how to pick a unit for your own systems — see the seconds vs milliseconds guide.

Common use cases

A few of the situations developers find themselves needing this tool:

Getting the current epoch in your code

Every modern language has a one-liner for "now as a Unix timestamp". A short reference:

For the full version with code for converting from a date string back to a Unix integer in each language, see Unix epoch in every language.

Going deeper

If you find yourself touching Unix timestamps in production code, a few of the rough edges to know about:

The full guides index has eight long-form articles in total.