Unix Timestamp Converter

Works offlineNothing is uploadedFree, no sign-up
Now (seconds)—
Now (milliseconds)—
Now (UTC)—
UTC—
Your time—
Readable—
Relative—

Convert a Unix timestamp to a readable date and back — seconds, milliseconds, microseconds or nanoseconds, detected automatically. See the moment in UTC and your own timezone, convert whole lists at once, and copy the current epoch with one click.

Reading a timestamp by its length

The unit is almost always visible in the digit count, because the ranges do not overlap for any date anyone plausibly means:

DigitsUnitExampleThat example, decoded
10seconds172466880026 Aug 2024, 10:40 UTC
13milliseconds1724668800000the same instant
16microseconds1724668800000000the same instant
19nanoseconds1724668800000000000the same instant

JavaScript's Date.now() returns milliseconds; Python's time.time() returns seconds as a float; Go's time.Now().UnixNano() returns nanoseconds; most REST APIs and databases use seconds. When a date renders as 1970 the number was seconds fed somewhere expecting milliseconds; when it renders tens of thousands of years out, the reverse.

Constants worth recognising on sight

ValueMomentWhy it turns up
01 Jan 1970, 00:00 UTCthe epoch itself; a zero that leaked through as a date
864002 Jan 1970one day of seconds — a duration mistaken for a moment
10000000009 Sep 2001the billennium; also a magic number in test data
214748364719 Jan 2038, 03:14:07 UTCthe 32-bit signed maximum — the year 2038 problem
25340230079931 Dec 9999, 23:59:59 UTC"never expires" in systems capped at four-digit years

Getting the current timestamp in your own tools

EnvironmentSecondsMilliseconds
JavaScriptMath.floor(Date.now()/1000)Date.now()
Pythonint(time.time())int(time.time()*1000)
Shelldate +%sdate +%s%3N (GNU)
PostgreSQLextract(epoch from now())::int(extract(epoch from now())*1000)::bigint
MySQLUNIX_TIMESTAMP()ROUND(UNIX_TIMESTAMP(NOW(3))*1000)

Everything on this page runs in your browser; no timestamp you paste is sent anywhere.

Frequently asked questions

What is a Unix timestamp?

A count of seconds since 1 January 1970, 00:00:00 UTC — the Unix epoch. It is a single number with no timezone attached, which is exactly why systems exchange time this way: 1724668800 names the same instant on every machine in the world, and each machine formats it into its own local clock only for display.

How do I tell seconds from milliseconds?

Count the digits. A present-day timestamp in seconds has 10 digits (until the year 2286), in milliseconds 13, in microseconds 16 and in nanoseconds 19. The tool uses the same rule to detect the unit. Getting it wrong does not produce an error — it produces a plausible-looking date in January 1970 or in the year 56638, which is why APIs mixing the two is such a common bug.

Does my timezone change the timestamp?

No. The timestamp itself is the same number everywhere — it counts from a fixed instant in UTC. Your timezone only changes how that instant is written as a wall-clock date. That is why the tool shows both: the UTC form for logs and APIs, and your local form for knowing when something actually happened for you.

What is the year 2038 problem?

Systems that store Unix time as a signed 32-bit integer run out of room at 2,147,483,647 — which is 19 January 2038, 03:14:07 UTC. One second later the value wraps negative, landing in December 1901. Modern systems store 64 bits and are fine for 292 billion years; the problem lives on in old embedded devices, file formats and database columns declared as 32-bit integers.

Do Unix timestamps include leap seconds?

No. Unix time pretends leap seconds do not exist: every day is exactly 86,400 seconds. When UTC inserts a leap second, Unix clocks repeat or smear a second instead. For converting timestamps this is a feature — arithmetic stays simple — but it means Unix time and true elapsed physical seconds have drifted apart by 27 seconds since 1972.

Why does the batch tab mark a line as invalid?

The batch tab reads one number per line — an optionally signed integer, or a decimal fraction of seconds like Python's time.time() prints. Date strings such as 2024-08-26 are not timestamps and are marked rather than guessed at; convert those on the second tab, which reads a calendar date explicitly.

Related tools