Skip to content

Unix Timestamp Converter

Convert epoch time to a readable date, or a date to a Unix timestamp, in any time zone. Seconds, milliseconds, microseconds and nanoseconds are detected automatically.

Current Unix timestamp

…

Milliseconds

…

UTC

…

Timestamp → date

Date → timestamp

What is Unix time?

Unix time counts the seconds since 00:00:00 UTC on 1 January 1970, the “Unix epoch”. Because it’s just a number with no time zone, it’s the standard way to store and exchange moments in time: in API responses, databases, JWT tokens (exp, iat), log files and HTTP caching.

Seconds, milliseconds, microseconds or nanoseconds?

UnitDigits todayExampleCommonly used by
Seconds101792800000Unix, PHP, Python’s time(), most APIs, JWTs
Milliseconds131792800000000JavaScript (Date.now()), Java, many JSON APIs
Microseconds161792800000000000PostgreSQL internals, some logging systems
Nanoseconds191792800000000000000Go (UnixNano), Python’s time_ns(), tracing tools

Mixing these up is the most common timestamp bug: a seconds value read as milliseconds lands in January 1970, and a milliseconds value read as seconds lands tens of thousands of years in the future.

Notable Unix timestamps

TimestampDateWhy it matters
01970-01-01 00:00:00 UTCThe Unix epoch
10000000002001-09-09 01:46:40 UTCThe first billion seconds
12345678902009-02-13 23:31:30 UTCCelebrated by developers worldwide
20000000002033-05-18 03:33:20 UTCTwo billion seconds
21474836472038-01-19 03:14:07 UTCLargest signed 32-bit value: the Year 2038 problem
42949672952106-02-07 06:28:15 UTCLargest unsigned 32-bit value

Get the current Unix timestamp in code

JavaScript
Math.floor(Date.now() / 1000); // seconds
Date.now();                      // milliseconds

Convert a Unix timestamp to a date in code

JavaScript
new Date(1792800000 * 1000).toISOString();
// '2026-10-24T00:00:00.000Z'

Time zones: store UTC, convert when you display

A timestamp is the same everywhere, so store and send timestamps (or ISO 8601 strings in UTC) and convert to a local time zone only when showing a date to a person. Use IANA zone names like Africa/Lagos or America/New_York rather than fixed offsets: offsets change with daylight saving time, and the converter above accounts for that automatically.

Many public APIs return Unix time. Weather APIs like Open-Meteo can return it for forecast hours, and crypto and stock APIs use it for price history. Find more in the API directory.

Frequently asked questions

What is a Unix timestamp?

A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have passed since 00:00:00 UTC on 1 January 1970, not counting leap seconds. It's a single number that means the same instant everywhere in the world, which is why APIs, databases and log files use it.

How do I know if a timestamp is in seconds or milliseconds?

Count the digits. Present-day timestamps have 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds. The converter detects this automatically and tells you which unit it used; you can override it with the unit menu.

Is a Unix timestamp in UTC or my local time?

Always UTC. A timestamp has no time zone: it counts seconds from a fixed moment. Time zones only matter when you display it as a date, which is why the converter shows UTC, your local time and any zone you pick.

What is the Year 2038 problem?

Systems that store Unix time as a signed 32-bit integer can count only up to 2,147,483,647, which is 03:14:07 UTC on 19 January 2038. One second later the value overflows to a negative number (December 1901). Modern systems use 64-bit timestamps, which last for billions of years, but old embedded devices and some databases are still at risk.

Can Unix timestamps be negative?

Yes. Negative timestamps are dates before 1970; -86400 is 31 December 1969. Most languages handle them, though some older systems and APIs don't.

Do Unix timestamps include leap seconds?

No. Unix time treats every day as exactly 86,400 seconds, so leap seconds are ignored. That keeps date arithmetic simple, at the cost of being up to a few dozen seconds off from atomic time (TAI).

More free developer tools