toolqik

79 · Date & Time

Timestamp Converter

Unix epoch ⇄ human dates, with a live ticking clock.

Runs in your browser
Current Unix time

Timestamp → date

Date → timestamp

About this tool

A Unix timestamp (also called epoch time or POSIX time) is the number of seconds since 1 January 1970, 00:00:00 UTC. It’s how servers, databases, logs, JWTs and APIs store moments in time: one number, with no time zone or date format to get wrong. This epoch converter turns those numbers into readable dates and back, and shows the current Unix time ticking live at the top.

How to use it

  1. Timestamp → date: paste a number. In Auto mode the unit (seconds, milliseconds, microseconds or nanoseconds) is detected from the number of digits, or you can pick it. You get the date in UTC, in your local time zone, as ISO 8601 and as a relative time like “3 hours ago”.
  2. Date → timestamp: pick a date and time, and say whether it’s in your local time or UTC. You get the timestamp in seconds and milliseconds.
  3. Click any value to copy it.

Seconds, milliseconds, microseconds or nanoseconds?

Different systems count in different units. For dates around today, the number of digits tells you which one you have:

UnitDigits todayExampleUsed by
Seconds101700000000Unix, PHP time(), Python time.time(), Go Unix(), JWT claims
Milliseconds131700000000000JavaScript Date.now(), Java currentTimeMillis(), Kafka, many JSON APIs
Microseconds161700000000000000PostgreSQL internals, some tracing and analytics tools
Nanoseconds191700000000000000000Go UnixNano(), OpenTelemetry, InfluxDB, Prometheus internals

Mixing them 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

TimestampDate (UTC)
01970-01-01 00:00:00The Unix epoch
10000000002001-09-09 01:46:40First 10-digit timestamp
17000000002023-11-14 22:13:20
20000000002033-05-18 03:33:20
21474836472038-01-19 03:14:07Largest signed 32-bit value: the “year 2038 problem”

Get the current timestamp and convert it in code

Math.floor(Date.now() / 1000);             // current Unix time, seconds
Date.now();                                 // ... in milliseconds

new Date(1700000000 * 1000).toISOString();  // "2023-11-14T22:13:20.000Z"
Date.parse('2024-01-01T00:00:00Z') / 1000;  // 1704067200

Time zone pitfalls

  • A timestamp has no time zone. 1700000000 is the same instant everywhere; only its display changes. Store timestamps or UTC, and convert to local time only when showing it to a person.
  • JavaScript date strings: new Date("2024-01-01") is read as UTC midnight, but new Date("2024-01-01T00:00") is read as local midnight. Add a Z or an offset (+05:30) to be explicit.
  • Python: always pass tz=timezone.utc. datetime.utcfromtimestamp() returns a “naive” datetime without a time zone and is deprecated since Python 3.12.
  • MySQL: FROM_UNIXTIME() and TIMESTAMP columns use the session’s time zone, so the same number can display differently on two connections.

The year 2038 problem

Systems that store Unix time as a signed 32-bit integer can only count up to 2,147,483,647, which is 19 January 2038 at 03:14:07 UTC. One second later the value wraps around to a negative number, which reads as December 1901. Modern 64-bit systems and languages are not affected, but old embedded devices, file formats and database columns declared as 32-bit integers still are. Use 64-bit integers (BIGINT) or proper date types for anything that might reach 2038.

FAQ

What is the current Unix timestamp?

It is shown live at the top of this page, in seconds and milliseconds. It increases by one every second.

How do I convert a Unix timestamp to a date?

Paste it into the Timestamp → date box. The unit is detected automatically, and you get the date in UTC and in your local time zone. In code, multiply seconds by 1000 for JavaScript: new Date(ts * 1000).

Is my timestamp in seconds or milliseconds?

Count the digits. For current dates, 10 digits means seconds and 13 digits means milliseconds. 16 is microseconds and 19 is nanoseconds.

Why does my date show 1970?

A timestamp in seconds was treated as milliseconds, so it was 1000 times too small. Multiply it by 1000, or choose Seconds instead of Millis.

What is the year 2038 problem?

Systems that store Unix time as a signed 32-bit integer overflow on 2038-01-19 03:14:07 UTC. Use 64-bit integers or ISO 8601 strings for dates beyond that.

Do Unix timestamps include time zones?

No. A timestamp is always UTC-based. Time zones only matter when you display it as a date.

Do timestamps account for leap seconds?

No. Unix time ignores leap seconds; every day is exactly 86,400 seconds.

esc
↑↓ navigate↵ open