ToolBook
Support us on Ko-fi
Help us keep this free, forever

Unix Timestamp Converter

How to convert a Unix timestamp to a readable date

Convert between Unix epoch numbers and human-readable dates across any timezone using ToolBook.

  1. Enter a timestamp or date

    Type or paste an epoch number (seconds, milliseconds, or microseconds) or an ISO 8601 date string into the input field.

  2. Or use the live current time

    Click "Use Now" to pre-fill the current Unix timestamp automatically.

  3. Pick a timezone

    Select your desired timezone from the dropdown. ISO 8601, UTC, and local outputs all update instantly.

  4. Copy any format

    Click the copy icon next to any result: ISO 8601, UTC / RFC 2822, local time, or relative time.

  5. Use the reference landmarks

    Click any landmark (Unix Epoch, Y2K, Y2038 limit) in the reference section to load it instantly and inspect its formatted date.

Frequently asked questions

What is a Unix timestamp?

A Unix timestamp (or epoch time) is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970. It is a universal, timezone-independent way to represent a point in time, used by databases, APIs, and log files worldwide.

Should I use seconds or milliseconds?

Most Unix timestamps are in seconds. JavaScript's Date.now() returns milliseconds. If your number is 13 digits long, it is likely milliseconds; the tool auto-detects numbers above 10¹² and treats them as milliseconds.

What is the maximum Unix timestamp?

The 32-bit signed integer representation overflows at 2,147,483,647 (03:14:07 UTC on 19 January 2038, the "Year 2038 problem"). 64-bit systems and languages extend this to the year 292 billion, so modern code is not affected.

How do I convert an ISO date string to a Unix timestamp?

Paste the ISO 8601 string (e.g. 2024-06-15T10:30:00Z) into the input. The tool parses it automatically and shows the corresponding epoch seconds.

Why does the time look different in different timezones?

A Unix timestamp is always UTC-based. When you change the timezone, the formatter shows the same absolute moment in wall-clock time for that timezone; the underlying epoch number does not change.

What does the live ticker show?

The ticker shows the current Unix timestamp in real time, updating every second. It is useful to copy the "now" value for log entries, API calls, or debugging.

how do i get the current unix timestamp in javascript or python?

In JavaScript, use Math.floor(Date.now() / 1000) for seconds or Date.now() for milliseconds. In Python, import time and call int(time.time()) for seconds or time.time_ns() // 1_000_000 for milliseconds. Click "Use now" in the tool to copy the current epoch value instantly.

what is the difference between iso 8601 and rfc 2822 date formats?

ISO 8601 uses the format 2024-06-15T10:30:00.000Z: compact, sortable, and the standard for APIs and databases. RFC 2822 (also displayed as "UTC string") uses a longer format like "Sat, 15 Jun 2024 10:30:00 GMT", common in HTTP headers and email. Both represent the same moment; the choice depends on the protocol you are working with.

how many seconds are in a day, week, or year?

1 minute = 60 seconds. 1 hour = 3,600 seconds. 1 day = 86,400 seconds. 1 week = 604,800 seconds. 1 month (30.44 days avg) = 2,629,743 seconds. 1 year (365.25 days) = 31,557,600 seconds. These values are useful for calculating offsets when building APIs, cron jobs, or TTL values.

Unix timestamps explained: epoch, timezones, and the Year 2038 problem

Why computers count from 1970, how timezones interact with epoch time, and what happens in 2038.

Why computers count from 1 January 1970

Unix epoch time (or POSIX time) counts the number of seconds elapsed since midnight UTC on 1 January 1970. The date was chosen by the early Unix developers at Bell Labs — it was simply "a recent, round date" at the time the system was designed, in the late 1960s.

A Unix timestamp is timezone-independent: 1715000000 means the same absolute instant everywhere on Earth. Converting to a local clock time requires knowing the observer's timezone offset.

Seconds vs milliseconds: the most common confusion

Nearly every language runtime has its own convention:

| Platform | Resolution | Example | |---|---|---| | Unix time(), Python time.time() | Seconds | 1715000000 | | JavaScript Date.now() | Milliseconds | 1715000000000 | | Java System.currentTimeMillis() | Milliseconds | 1715000000000 | | Python datetime microseconds | Microseconds | 1715000000000000 |

The easiest way to tell: a 10-digit timestamp is seconds; 13 digits is milliseconds. The tool auto-detects values ≥ 10¹² as milliseconds.

ISO 8601: the portable date format

When storing or transmitting timestamps as strings, use ISO 8601: 2024-05-07T10:30:00Z. The trailing Z means UTC. With offset: 2024-05-07T10:30:00+05:30 for IST.

Why ISO 8601 and not 07/05/2024? Because "07/05/2024" is ambiguous — the US reads it as July 5th, most of the world reads it as May 7th. ISO 8601 is sortable lexicographically, unambiguous, and machine-readable.

The Year 2038 Problem

A 32-bit signed integer can store values from −2,147,483,648 to 2,147,483,647. Unix time 2,147,483,647 falls on 03:14:07 UTC, 19 January 2038.

At that moment, any system still using 32-bit signed integer timestamps will overflow to a large negative number, causing dates to appear as 1901. This affects embedded systems, older databases, and legacy C code using time_t as int32.

Modern 64-bit systems use 64-bit integers for timestamps, extending the representable range to the year 292 billion — there is no practical concern for any software written since the early 2000s.

Timezone arithmetic

A Unix timestamp is always UTC. Adding the timezone offset gives local wall-clock time. India Standard Time (IST) is UTC+5:30 — so UTC 10:00:00 is IST 15:30:00.

Daylight Saving Time (DST) makes this more complicated: the offset changes twice a year. The IANA timezone database (used by every browser and most runtimes) tracks the full history of DST transitions for every timezone. Always store timestamps in UTC and convert to local time only at display time.

Relative time and the UX of timestamps

Raw timestamps like 2024-05-07T10:30:00Z are opaque to most users. Relative times like "3 hours ago" or "in 2 days" are immediately intuitive. The standard is to show relative time for events within the last week, then switch to the absolute date for older items.

Libraries like date-fns, dayjs, and the native Intl.RelativeTimeFormat API handle this formatting correctly across languages.