GALAXY OF TOOLS

DATES SECTOR

Unix Timestamp Converter

Convert epoch time to a readable date in any time zone, and dates back to Unix seconds or milliseconds.

Current Unix timelive
—Seconds since 1 Jan 1970 UTC
—Milliseconds

Timestamp to date

Seconds, ms, µs or ns — the unit is detected from the length.
—

Date and time to timestamp


Batch convert

Each line is auto-detected. Results use the time zone chosen above.

Runs entirely in your browser. Nothing you enter or upload is sent to a server.

A Unix timestamp converter that speaks every format

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. Servers, databases, log files, APIs, JSON Web Tokens and spreadsheets store dates this way because a single integer is easy to sort, compare and transmit. This Unix timestamp converter turns those numbers into dates a person can read, and turns dates back into timestamps.

Paste a value and the tool works out whether it is in seconds, milliseconds, microseconds or nanoseconds, then shows the moment in UTC, in your own time zone and in any other IANA time zone you pick, along with ISO 8601, RFC 2822, relative time, day of the year and ISO week. A live clock shows the current epoch time, and batch mode converts a whole column of timestamps at once.

Everything is calculated in your browser with exact integer arithmetic, so nanosecond values keep all nine decimal places and nothing you paste is sent anywhere.

How to use the Unix Timestamp Converter

  1. Copy the current epoch time from the live clock at the top, in seconds or milliseconds, with one tap.
  2. Paste a timestamp into “Unix timestamp”. Leave the unit on “Auto-detect” or force seconds, milliseconds, microseconds or nanoseconds.
  3. Pick a zone in “Show in time zone” to see the same instant in New York, London, Kolkata, Tokyo or anywhere else.
  4. To go the other way, enter a date, a time and the time zone it belongs to under “Date and time to timestamp”.
  5. For many values, paste one timestamp per line into “Batch convert”, then download the table as CSV or copy it into a spreadsheet.

Unix Timestamp Converter features

Automatic unit detection

Up to 11 digits is read as seconds, 12–14 as milliseconds, 15–17 as microseconds and 18 or more as nanoseconds — you can always override it.

Every common format

UTC, local time, any IANA zone, ISO 8601 with Z or an offset, RFC 2822 for email and HTTP headers, and relative time such as “3 days ago”.

Daylight-saving aware

When a local time is skipped or repeated by a clock change, the converter says so and shows both possible timestamps.

Nanosecond precision

Big integers are handled exactly, so 1700000000123456789 keeps its .123456789 fraction instead of being rounded.

Batch conversion

Convert up to 1,000 timestamps in one go and export them as a CSV file.

Year 2038 check

Each result tells you whether the value still fits in a signed 32-bit time_t.

Seconds, milliseconds, microseconds or nanoseconds?

Different systems count epoch time in different units, which is the most common source of “my date is in the year 55,000” bugs. Unix shells, PHP, Python’s time.time() and most databases use seconds. JavaScript’s Date.now(), Java’s System.currentTimeMillis() and many REST APIs use milliseconds. Go, Rust and high-resolution loggers often use microseconds or nanoseconds. A present-day timestamp has 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds.

UnitDigits todayExample (14 Nov 2023 22:13:20 UTC)Typical source
Seconds101700000000Unix date +%s, PHP time(), MySQL UNIX_TIMESTAMP()
Milliseconds131700000000000JavaScript Date.now(), Java
Microseconds161700000000000000Python datetime.timestamp() × 10⁶, PostgreSQL internals
Nanoseconds191700000000000000000Go UnixNano(), Python time.time_ns()

The Year 2038 problem

Many older programs store Unix time in a signed 32-bit integer. The largest value it can hold is 2,147,483,647, which is 03:14:07 UTC on Tuesday 19 January 2038. One second later the counter overflows to −2,147,483,648 and the date jumps back to 20:45:52 UTC on Friday 13 December 1901. It is the same kind of bug as Y2K, just with binary numbers.

Modern operating systems, languages and databases have largely moved to 64-bit time values, which will not overflow for about 292 billion years. The risk lives on in embedded devices, old file formats and database columns that are still 32-bit — for example, the MySQL TIMESTAMP type only covers dates up to 2038-01-19 03:14:07 UTC. If you schedule anything long-term, such as 20-year loan dates or certificate expiry, test it with a timestamp past 2038.

Getting the current timestamp in code

  • JavaScript: Math.floor(Date.now() / 1000) for seconds, Date.now() for milliseconds.
  • Python: int(time.time()), or time.time_ns() for nanoseconds.
  • PHP: time() · Java: Instant.now().getEpochSecond() · Go: time.Now().Unix().
  • C#: call ToUnixTimeSeconds() on DateTimeOffset.UtcNow · Bash: date +%s.
  • Excel or Google Sheets: convert seconds in A1 to a date with =A1/86400+DATE(1970,1,1) and format the cell as a date (the result is in UTC).

Time zones, leap seconds and other gotchas

A Unix timestamp has no time zone: it identifies one instant, everywhere on Earth. The zone only matters when you display it or when you turn a local wall-clock time into a timestamp. That reverse step can be ambiguous: when clocks spring forward, a time like 02:30 simply does not happen, and when they fall back, 01:30 happens twice. The converter flags both cases. To compare clock times between cities, the Time Zone Converter is quicker.

Unix time also ignores leap seconds — every day is treated as exactly 86,400 seconds — so subtracting two timestamps gives elapsed civil time, not atomic time. For whole-day gaps between calendar dates, use the Date Difference Calculator; for schedules, the Cron Expression Generator is the natural companion.

Unix Timestamp Converter FAQ

What is a Unix timestamp?

It is the number of seconds elapsed since the Unix epoch, 1 January 1970 at 00:00:00 UTC, not counting leap seconds. Negative values are dates before 1970. Because it is a plain number, it is the same in every time zone.

How do I convert a Unix timestamp to a date?

Paste it into the Unix timestamp converter above. The unit is detected automatically and the date appears in UTC, your local time and the time zone you choose, plus ISO 8601 and RFC 2822 versions you can copy.

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

Count the digits. Dates from 2001 to 2286 have 10 digits in seconds and 13 in milliseconds. If a value gives you a date thousands of years in the future, it is probably milliseconds being read as seconds.

Why is my converted time off by a few hours?

The timestamp is in UTC, and the difference is your time-zone offset. Make sure you read the row for the zone you care about. If the gap is exactly one hour, a daylight-saving change is usually the reason.

What happens to Unix time in 2038?

Systems that store it as a signed 32-bit number overflow after 03:14:07 UTC on 19 January 2038. Software using 64-bit integers, which is now the norm, is unaffected.

Is the epoch time shown here accurate?

The live clock reads your device’s clock, so it is as accurate as your system time. Conversions are exact: the tool uses integer calendar arithmetic and your browser’s built-in time-zone database.

You might also need