Date & time · Unix epoch

Unix time in milliseconds.

See the current Unix time in milliseconds, or enter any epoch value to convert between seconds, milliseconds, microseconds and nanoseconds and the date they mean.

Advertisement

Convert

Unix milliseconds right now…
Auto: up to 11 digits is seconds, 12-14 digits milliseconds, 15-17 microseconds, 18 or more nanoseconds.
A Unix timestamp is the same instant everywhere; the zone only changes how it is written.

Result

Enter an epoch value to convert.

Why milliseconds?

JavaScript counts time in milliseconds, so Date.now() returns 13 digits where a Unix time() call returns 10. Java, Kotlin, Android and many JSON APIs follow JavaScript. Multiply seconds by 1,000 to get milliseconds, and divide by 1,000 (rounding down) to go back.

UnitDigits todayPer second
Seconds101
Milliseconds131,000
Microseconds161,000,000
Nanoseconds191,000,000,000

Unix milliseconds in code

LanguageNowTimestamp to dateDate to timestamp
JavaScriptDate.now()new Date(1709654400000).toISOString()Date.parse('2024-03-05T16:00:00Z')
JavaSystem.currentTimeMillis()Instant.ofEpochMilli(1709654400000L)Instant.parse("2024-03-05T16:00:00Z").toEpochMilli()
Gotime.Now().UnixMilli()time.UnixMilli(1709654400000).UTC()time.Date(2024, 3, 5, 16, 0, 0, 0, time.UTC).UnixMilli()
Pythontime.time_ns() // 1_000_000datetime.fromtimestamp(1709654400000 / 1000, tz=timezone.utc)int(datetime(2024, 3, 5, 16, tzinfo=timezone.utc).timestamp() * 1000)
PostgreSQLSELECT (EXTRACT(EPOCH FROM now()) * 1000)::bigint;SELECT to_timestamp(1709654400000 / 1000.0);SELECT (EXTRACT(EPOCH FROM timestamptz '2024-03-05 16:00:00+00') * 1000)::bigint;

FAQ

How many digits is Unix time in milliseconds?

Thirteen digits for any date between September 2001 and November 2286. Seconds have ten digits over the same span.

How do I get the current Unix time in milliseconds?

The live counter at the top of this page shows it. In JavaScript use Date.now(); in Java System.currentTimeMillis(); in Go time.Now().UnixMilli().

How do I convert milliseconds to seconds?

Divide by 1,000 and round down. 1710000000123 ms is 1710000000 s and 123 ms.

What is Unix epoch time?

Unix time counts seconds since 00:00:00 UTC on 1 January 1970, the Unix epoch. POSIX defines it so that every day is exactly 86,400 seconds, which is why 1970-01-02T00:00:00Z is 86400.

What is the largest date this converter accepts?

JavaScript time values run from -8,640,000,000,000,000 to 8,640,000,000,000,000 milliseconds around the epoch, about 275,000 years either side of 1970. Values outside that range are rejected rather than guessed.

Can a Unix timestamp be negative?

Yes. A negative value is a moment before 1970-01-01, for example -1 is 1969-12-31T23:59:59Z. POSIX leaves the formula undefined before 1970, but most languages extend the same arithmetic backwards and so does this tool.

Is my data sent anywhere?

No. The conversion runs in your browser and nothing you type is uploaded or stored.

Sources (each opened 2026-10): POSIX.1-2017 Base Definitions, 4.16 Seconds Since the Epoch; ECMAScript Language Specification, Time Values and Time Range; Python documentation, datetime; Python documentation, time; Go documentation, package time; Java SE 21 API, java.time.Instant; Java SE 21 API, java.lang.System; PostgreSQL documentation, Date/Time Functions.

Advertisement
Advertisement