Unix Epoch Converter

Convert Unix timestamps in seconds or milliseconds to dates in UTC and your time zone, and dates back to epoch time.

Current Unix time: …

Read as seconds
UTC
2023-11-14 22:13:20Z
Your time zone
—

Date to timestamp

Seconds
—
Milliseconds
—
ISO 8601 (UTC)
—

Unix time

Unix time counts seconds from the epoch, 1970-01-01 00:00:00 UTC. Because it has no time zone, it’s how computers store and compare moments; it’s converted to local time only for display.

shell:       date +%s            date -d @1700000000
JavaScript:  Date.now() / 1000   new Date(1700000000 * 1000)
Python:      time.time()         datetime.fromtimestamp(1700000000, timezone.utc)

Detecting the unit

Today’s timestamps are 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds. The converter uses that to read the number correctly, so you can paste from logs, databases or JSON without editing.

Common questions

What is Unix epoch time?

The number of seconds since 00:00:00 UTC on January 1, 1970, not counting leap seconds. It’s the same everywhere in the world at a given moment.

Seconds or milliseconds?

Unix tools and most APIs use seconds (10 digits today). JavaScript’s Date.now() and Java use milliseconds (13 digits). The converter detects which from the length.

What is the year 2038 problem?

Systems that store epoch seconds in a signed 32-bit integer overflow at 03:14:07 UTC on January 19, 2038 (2,147,483,647). Modern systems use 64-bit time.

How do I get the current epoch time?

In a shell, date +%s. In JavaScript, Math.floor(Date.now() / 1000). In Python, int(time.time()).

MathApps is free and ad-free for now. If it helped, buy us some art supplies — supporters never see ads, even if we add them.