Timestamp Converter

The current Unix time, live — plus two-way conversion between Unix timestamps and human-readable dates, in UTC and your local time.

Current Unix timestamp

—

Seconds since epoch · — milliseconds

Timestamp → date

UTC—
Your local time—
Relative—

Date → timestamp

Seconds—
Milliseconds—

What Is a Unix Timestamp?

A Unix timestamp — also called epoch time or POSIX time — is simply a count of the seconds that have elapsed since one fixed moment: 1 January 1970, 00:00:00 UTC. That moment is called the Unix epoch. Instead of storing a date as a tangle of years, months, days and time zones, a computer can store a single number, and every later moment is just a bigger number. Timestamp 0 is the epoch itself, 86,400 is one day later, 1,000,000,000 was reached on 9 September 2001, and the count passed 1,700,000,000 in November 2023. Negative timestamps represent moments before 1970. The same timestamp means the same instant everywhere on Earth; time zone only matters when a human converts it into a local reading, which is what this page does.

How This Timestamp Converter Works

The live panel at the top reads your device clock once per second and shows the current time as seconds and as milliseconds since the epoch, with a pause button for when you need the number to hold still while you copy it. The timestamp-to-date section takes any number, treats it as seconds or milliseconds according to the unit you select, and shows the matching instant in UTC, in your browser's local time zone, and as a plain relative description such as "3 days ago" or "in 5 hours". The date-to-timestamp section does the reverse: pick a local date and time, and it reports the exact seconds and milliseconds value that databases, APIs and log files would store for that moment. Copy buttons sit beside the outputs so numbers move into your code without transcription errors.

Seconds or Milliseconds? The 10-Digit and 13-Digit Rule

The most common timestamp mistake in real work is confusing seconds with milliseconds. A current timestamp in seconds has 10 digits; in milliseconds it has 13 digits, because it carries three extra digits of precision. JavaScript's Date.now() returns milliseconds, while most Unix tools, PHP's time(), and many databases work in seconds. Feed a milliseconds value into a field expecting seconds and the date lands tens of thousands of years in the future; feed seconds where milliseconds are expected and the date collapses back to January 1970. When a converted date looks absurd, count the digits first — that one check diagnoses the problem more often than everything else combined. This converter makes you choose the unit explicitly, so the mistake is visible rather than silent.

Worked Examples

Reading a log file. A server log records an event at 1700000000. Entered as seconds, that is 14 November 2023, 22:13:20 UTC — the local reading depends on where you are, which is why logs should always be stored in UTC and converted only for display. Checking an API response. An API returns "created_at": 1699920000000. The 13 digits tell you it is milliseconds; it converts to 14 November 2023, 00:00:00 UTC. Setting an expiry. You want a token to expire at midnight on 1 January 2027 UTC. Using the date section with your offset in mind, or a UTC-based tool, gives 1798761600 seconds — the number to store. Database queries. To find rows created in the last hour, developers compare a stored timestamp column against the current timestamp minus 3,600 — arithmetic that only works this cleanly because timestamps are plain numbers.

The 2038 Problem, Briefly

Older systems stored timestamps in a signed 32-bit integer, whose largest value is 2,147,483,647 — corresponding to 19 January 2038 at 03:14:07 UTC. One second later, that storage overflows and wraps to a negative number, which reads as a date in 1901. This is the Year 2038 problem, a cousin of the Y2K bug. Modern operating systems, databases and languages overwhelmingly use 64-bit timestamps, which will not overflow for hundreds of billions of years, so the risk today is mostly in old embedded devices, legacy file formats and forgotten firmware. It is worth knowing about when an old system shows a strange date, but timestamps remain the most reliable way to store an instant.

Tips for Working With Timestamps

Store timestamps in UTC and convert to local time only when displaying them; storing local times creates ambiguity at daylight-saving changes, when one local hour happens twice or not at all. Record which unit you are using in the column or field name — created_at_ms prevents the 10-versus-13-digit confusion for everyone who reads the data later. When debugging, convert the same timestamp in two independent tools and compare; if they disagree, one of them has assumed the wrong unit or time zone. Finally, remember that a timestamp is an instant, not a calendar date: "a user's birthday" is a date and should not be stored as a timestamp, while "the moment this order was placed" is an instant and should be.

Frequently Asked Questions

Why does my timestamp convert to a date in 1970 or the far future?

Almost always a unit mismatch. Seconds have 10 digits and milliseconds have 13. If the date lands near 1970, milliseconds were expected; if it lands thousands of years ahead, a milliseconds value was read as seconds. Switch the unit select and try again.

What is the difference between UTC and local time in the results?

They are the same instant expressed two ways. UTC is the universal reference time; local time is that instant shifted by your time zone (and daylight saving, when it applies). The timestamp itself is identical either way.

Can this converter handle dates before 1970?

Yes. Moments before the epoch are negative timestamps, and the date-to-timestamp section will produce negative values for dates before 1 January 1970. Very old or very distant dates may be limited by your browser's date handling.

Is anything I enter sent to a server?

No. The live clock, conversions and relative-time text are all computed in your browser; nothing you type leaves your device.