Unix Timestamp Converter Online Free

⏰ Date and Time Free Forever

Unix Timestamp Converter Online Free

Convert any Unix timestamp to a human-readable date, or convert any date back to a Unix timestamp. Supports seconds and milliseconds, with live current timestamp.

Current Unix timestamp (seconds)
Unix timestamp
Invalid timestamp. Enter a valid Unix epoch value.
Enter a timestamp above
About This Tool

Unix time explained, and a converter that goes both ways

A Unix timestamp is a single integer: the number of seconds since midnight UTC on 1 January 1970. No time zone, no format, no locale. That is the entire point. Every server, database and log file can agree on one number, and the messy business of turning it into something a human reads happens at the last possible moment.

This tool converts a timestamp into eight readable forms, converts a date back into a timestamp, and shows a live clock ticking the current epoch second so you can grab it with one click.

Reading a timestamp by its length

Different systems emit different precisions. Digit count tells you which one you are holding, and getting it wrong throws your date off by roughly fifty years.

1718409600 10 digits Seconds. The classic Unix timestamp. Standard in C, PHP, Go, most APIs and every command line tool.
1718409600000 13 digits Milliseconds. What JavaScript Date.now returns, and what Java System.currentTimeMillis gives you.
1718409600000000 16 digits Microseconds. Common in Python time.time_ns divided down, and in Postgres internal storage.
1718409600000000000 19 digits Nanoseconds. Go time.UnixNano, Prometheus and most high resolution tracing systems.

The tool auto detects thirteen digit input as milliseconds regardless of the unit toggle, because that is the overwhelmingly common mistake. For anything else, set the toggle explicitly.

What the epoch actually is

The 1 January 1970 zero point was chosen by the team building Unix at Bell Labs in the early 1970s. It was recent, round, and left plenty of headroom in a 32 bit signed integer. Timestamps before it are negative, which is legal and works fine in most modern languages.

01 January 1970, 00:00:00 UTC. The epoch itself.
-22089888001 January 1900. Negative timestamps run backward.
10000000009 September 2001. Widely celebrated by engineers at the time.
123456789013 February 2009. Another well known milestone.
214748364719 January 2038, 03:14:07 UTC. The 32 bit ceiling.
The year 2038 problem. A signed 32 bit integer maxes out at 2,147,483,647. One second later it overflows to negative, and a naive system reads the date as December 1901. This is a real issue in embedded devices, older C code and any database column typed as a 32 bit int. The fix is straightforward: use 64 bit time, which pushes the limit out roughly 292 billion years. Linux moved to 64 bit time_t on 32 bit architectures with kernel 5.6. Check your own stack rather than assuming, particularly anything storing future dates such as mortgage terms or pension maturity dates, which already cross the boundary today.

Leap seconds, and why Unix time ignores them

Unix time defines every day as exactly 86,400 seconds. Actual astronomical time does not cooperate, because the Earth’s rotation is slowly and unevenly slowing down. The International Earth Rotation Service has inserted 27 leap seconds since 1972 to keep UTC aligned with solar time.

Unix time simply skips them. When a leap second happens, the timestamp repeats a value or the clock is smeared across a window. Google and Amazon both use leap smearing, spreading the extra second across 24 hours so no clock ever jumps. What this means practically: Unix time is not a true count of elapsed SI seconds since 1970. It is off by 27 seconds and always will be. For anything short of precision astronomy or high frequency trading, that is irrelevant. In 2022 the international bodies agreed to stop adding leap seconds by 2035.

Generating timestamps in code

// JavaScript, returns milliseconds Date.now() Math.floor(Date.now() / 1000) // seconds new Date(1718409600 * 1000).toISOString() // Python import time, datetime time.time() # float seconds int(time.time()) # integer seconds datetime.datetime.fromtimestamp(ts, datetime.UTC) // PHP time(); date(‘Y-m-d H:i:s’, 1718409600); // SQL SELECT EXTRACT(EPOCH FROM NOW()); — Postgres SELECT UNIX_TIMESTAMP(); — MySQL SELECT strftime(‘%s’,‘now’); — SQLite // Shell date +%s date -d @1718409600

Output formats this tool produces

FormatExampleWhere you use it
UTC stringSat, 15 Jun 2024 00:00:00 GMTHTTP headers, email dates, RFC 7231
ISO 86012024-06-15T00:00:00.000ZJSON APIs, logs, database columns
Local time15/06/2024, 01:00:00Rendered in your browser time zone
DD/MM/YYYY15/06/2024Reports and spreadsheets
Time UTC00:00:00Isolating the clock component
Unix seconds1718409600Canonical storage
Unix milliseconds1718409600000JavaScript and Java interop
Relative3 days agoHuman readable recency

Local time and relative time are computed against your device clock and time zone, which the browser reports through Intl.DateTimeFormat().resolvedOptions().timeZone. Everything else is time zone independent by definition.

A note on storing timestamps

Store the integer, not the formatted string. Formatted dates carry a locale assumption, sort incorrectly as text, and lose information about the time zone they were rendered in. If you need to preserve the user’s intended wall clock time, which matters for calendar events and scheduled jobs, store the local date, the local time and the IANA time zone identifier separately. A timestamp alone cannot represent that a meeting is at 9am in Berlin, because the offset changes twice a year.

Specifications and further reading

  • POSIX seconds since the Epoch is the formal definition, including the explicit statement that leap seconds are excluded.
  • RFC 3339 defines the timestamp string format used across internet protocols.
  • IANA Time Zone Database is the source of truth for every offset and daylight saving rule on Earth. Updated several times a year as governments change their minds.
  • MDN Date reference covers the JavaScript API and its many sharp edges.
  • Temporal.Instant is the modern JavaScript replacement, with nanosecond precision and no ambiguity.
  • Year 2038 problem for the full history of the 32 bit overflow and current mitigation status.

Everyday uses

Reading a raw log line, debugging a JWT expiry claim, checking when a cache entry was written, setting a cookie or token lifetime, decoding a database column that came back as a bare integer, comparing event ordering across servers in different regions, and sanity checking that a scheduled job fired when you thought it did.

Common Questions

Questions About Unix Timestamp Converter Online Free

A Unix timestamp is the number of seconds that have passed since January 1, 1970 at 00:00:00 UTC, which is called the Unix epoch. It is timezone-neutral, always increasing, and represented as a single integer, which makes it the standard way to store and compare dates in programming, databases, APIs, and server logs. For example, the timestamp 1718438400 represents June 15, 2024 at 08:00:00 UTC.

10-digit timestamps are in seconds and are the Unix standard used by most systems, including Linux, Python, PHP, and databases. 13-digit timestamps are in milliseconds and are used primarily by JavaScript, which represents time with Date.now() returning milliseconds. The tool auto-detects which unit you have based on digit count, but you can override it manually using the Seconds or Milliseconds buttons.

In JavaScript, pass milliseconds to the Date constructor: new Date(timestamp * 1000) if you have seconds, or new Date(timestamp) if you already have milliseconds. Then call .toISOString(), .toUTCString(), or .toLocaleString() to format it. This tool does exactly that conversion in your browser, so you can verify the output before using it in code.

Epoch time zero is the value 0 in Unix time, which corresponds to Thursday, January 1, 1970 at 00:00:00 UTC. This date was chosen when Unix was being developed in the early 1970s as a practical starting point. You can enter 0 in the timestamp field of this tool to confirm it converts correctly to that date and time.

Yes. Negative Unix timestamps represent dates before January 1, 1970. For example, -86400 is December 31, 1969 at 00:00:00 UTC. Most modern systems and programming languages support negative timestamps correctly. Enter a negative value in the timestamp field to convert any pre-1970 date. Note that very old dates (before 1901) may not be reliably supported in all browsers.

From the blog

Date and time, explained properly

Longer write ups on the calendar problems these tools solve, from ISO week numbering to scheduling across time zones.

Privacy Overview

Cookies let this site remember your preferences and show us which tools people actually use. Full detail sits in our Privacy Policy.