Unix timestamps,
in both directions

Paste an epoch value to read it as a date, or a date to get the epoch value back. Seconds and milliseconds are told apart automatically. Free, no sign-up required.

Current epoch time

Time zone

Timestamp to date

Enter a Unix timestamp to see it as a date.

Date to timestamp

A date with no zone is read as your local time. Add Z for UTC, or an offset such as +05:30.

Enter a date to see its Unix timestamp.

Features

Everything you need for working with epoch time.

Detects the unit for you

Seconds, milliseconds, microseconds, and nanoseconds are told apart by magnitude, with a manual override when the guess is wrong.

Any time zone

See the same instant in UTC and in a zone of your choosing, with the correct offset for that date.

Live epoch clock

The current timestamp ticks in real time, in both seconds and milliseconds, ready to copy.

Runs in your browser

Conversion uses your browser’s own date functions. Nothing you paste is sent anywhere.

How to convert a timestamp

Three steps, in whichever direction you need.

1

Paste the value

Put an epoch number in the left panel, or a date in the right. Both convert as you type.

2

Check the unit

The unit is detected from the magnitude and shown below the input. Override it if your data uses something unexpected.

3

Pick a time zone

Compare the same instant in UTC and any zone you choose, then copy whichever format you need.

When you need this

Where epoch values turn up in everyday work.

Reading log files

Logs and metrics almost always store epoch times. Paste one in to find out exactly when an event happened.

Checking token expiry

JWT exp and iat claims are Unix seconds. Convert them to see whether a token has already expired.

Debugging date bugs

A date showing as 1970 means a millisecond value was read as seconds. Comparing both here makes it obvious.

Writing database queries

Turn a human date into the epoch value a WHERE clause needs, in seconds or milliseconds.

Understanding epoch time

What the number represents, the unit mismatch behind almost every timestamp bug, why 2038 matters, and the difference between a UTC offset and a time zone.

What the number actually is

A Unix timestamp counts seconds since midnight UTC on 1 January 1970. That date has no special significance beyond being a round, recent-enough starting point when the convention was set at Bell Labs in the early 1970s.

The important property is that it carries no formatting and no time zone. It is a single integer naming one instant on the timeline, the same instant for everyone. Two systems in different countries that agree on a timestamp agree on the moment, even though they would print it differently.

Everything a human recognises as a date, the calendar, the clock, the zone, the daylight saving rule, is applied at display time. That separation is the whole reason the format is worth using.

Seconds, milliseconds, and the 1970 bug

The most common timestamp bug is a unit mismatch. Most backends, databases, and standards use seconds. JavaScript uses milliseconds. Passing one where the other is expected produces dates that are wrong by a factor of a thousand.

The failure is easy to recognise once you know the shape of it.

  • A date in January 1970You divided when you should not have, or passed seconds to something expecting milliseconds. The value is a thousand times too small.
  • A date tens of thousands of years awayThe opposite: milliseconds handed to something expecting seconds.
  • A date that is subtly wrongNot a unit problem. This is usually a time zone or daylight saving issue.
seconds       1784000000       10 digits
milliseconds  1784000000000    13 digits
microseconds  1784000000000000 16 digits

Digit count is a reliable check for any date in the current era, which is exactly what the automatic detection above uses.

The year 2038 problem

A signed 32-bit integer can hold values up to 2,147,483,647. As a count of seconds since 1970 that runs out at 03:14:07 UTC on 19 January 2038. One second later the value overflows into negative territory and the date reads as 13 December 1901.

It is the same class of problem as Y2K, and like Y2K most of it has been dealt with quietly. 64-bit time is standard on current systems, and a 64-bit signed count of seconds does not overflow for around 292 billion years.

What remains is embedded firmware, old file formats, and database columns that were declared as 32-bit integers years ago and never revisited. Anything storing a date past 2038, such as a long-dated contract or a certificate expiry, is where the problem shows up first.

Why leap seconds are ignored

The Earth’s rotation is not perfectly regular, so occasionally a leap second is added to keep civil time aligned with astronomical time. Unix time does not represent them. Every day is defined as exactly 86,400 seconds.

When a leap second occurs, the same Unix timestamp is used for two consecutive real seconds. The clock effectively pauses rather than counting past the boundary.

This is a deliberate trade. It means simple arithmetic on timestamps always works, and converting between a timestamp and a calendar date never needs a table of historical leap seconds. The cost is that the difference between two timestamps is not exactly the number of physical seconds that elapsed, which matters only in a handful of scientific and financial contexts.

Offsets are not time zones

A UTC offset such as +05:30 describes one moment. A time zone such as Asia/Kolkata describes a set of rules over time, including when daylight saving starts and stops and every historical change to the offset.

Storing an offset instead of a zone works until the rules move. A recurring 09:00 meeting in Europe/London is +01:00 in July and +00:00 in January. Store the offset and the meeting drifts by an hour twice a year.

Governments also change the rules with little notice, which is why the IANA time zone database is updated several times a year and why keeping that database current is a real operational task.

The practical rule: store an instant as UTC or as an epoch value, store the time zone as an IANA name alongside it when the local wall-clock time matters, and convert only at the point of display.

ISO 8601 and the Z

ISO 8601 is the interchange format worth standardising on: 2026-07-26T12:30:45Z. It sorts correctly as plain text, it is unambiguous about which component is the month, and every language can parse it.

The trailing Z means UTC, sometimes read as Zulu time. An offset can appear in its place, so 2026-07-26T18:00:45+05:30 describes the same instant as the example above.

A string with no zone at all is the one to be careful with. Its meaning depends on whoever parses it, and different runtimes disagree, so the same input can produce two different instants on two machines.

2026-07-26T12:30:45Z        unambiguous, UTC
2026-07-26T18:00:45+05:30   same instant, offset given
2026-07-26T12:30:45         ambiguous, depends on the reader

Common questions

What is a Unix timestamp?

A Unix timestamp is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, a moment known as the Unix epoch. Because it is a single number counted in UTC, it identifies an instant unambiguously, with no time zone or formatting attached.

How do I tell seconds from milliseconds?

Length is the giveaway. A present-day timestamp in seconds is 10 digits, and in milliseconds it is 13. If a date comes out in 1970 you have almost certainly read milliseconds as seconds, and if it lands tens of thousands of years in the future you have done the reverse.

Why does my date look wrong by a few hours?

That is a time zone difference rather than a wrong timestamp. The number itself is always UTC, but it gets displayed in whatever zone the viewer is in. Use the time zone selector above to compare the same instant in UTC and locally.

What is the year 2038 problem?

Systems that store Unix time in a signed 32-bit integer cannot count past 03:14:07 UTC on 19 January 2038. One second later the value overflows and becomes negative, reading as December 1901. Modern systems use 64-bit values, which are good for far longer than the age of the universe.

Do Unix timestamps account for leap seconds?

No. Unix time deliberately treats every day as exactly 86,400 seconds. When a leap second is inserted, the same timestamp is used twice rather than the count being incremented, which keeps the arithmetic simple at the cost of being slightly out of step with astronomical time.

Explore more developer tools

Check out our other free tools for developers.

View all tools