Time & time zones

Unix timestamp converter

Convert a timestamp or a dated local time to one clear UTC instant.

Your starting point

Your result
Let’s make it clear.
Choose your inputs, then calculate.

Calculated in your browser. Your inputs are not uploaded.

A Unix timestamp measures a distance from 1 January 1970 at 00:00:00 UTC. The number 0 identifies that instant. Positive numbers count after it and negative numbers count before it. The value may use seconds or milliseconds. The converter can take a value and show its UTC date, or resolve a dated local label into a Unix value when you choose the source time zone.

Read the unit in the record before entering the number

An API may use seconds for one field and milliseconds for another. Enter 1,000 as seconds and it gives sixteen minutes and forty seconds after the epoch. As milliseconds it gives one second after the epoch. Use the field definition and a known date to decide which unit was intended. Digit count can suggest the unit for recent events, but a small value near the epoch works with either interpretation and still describes widely different times.

Many logs store an integer timestamp. Some supply fractions of a second, which the form can express at JavaScript date precision. The UTC result includes milliseconds to show what instant is represented. Keep higher-resolution source data intact if the log uses microseconds or nanoseconds. Check that a large value fits the units and supported year range before trying to paste it into a consumer that expects a smaller scale.

Test the units close to the origin

NumberUnitUTC readingHow to check it
0seconds1970-01-01T00:00:00.000ZThe epoch is the zero reference
1seconds1970-01-01T00:00:01.000ZOne second is one thousand milliseconds
1000milliseconds1970-01-01T00:00:01.000ZDivide milliseconds by 1000 for seconds
1000seconds1970-01-01T00:16:40.000ZSixteen minutes account for 960 seconds
-1milliseconds1969-12-31T23:59:59.999ZMove one millisecond before midnight UTC
-1seconds1969-12-31T23:59:59.000ZMove a full second before the epoch

Small examples make an excellent sanity check while debugging a large timestamp. A modern integer in seconds often has roughly ten digits and a contemporary epoch in milliseconds roughly thirteen. Use the known origin examples when checking code instead of depending on those lengths. A record before 1970 legitimately begins with a minus sign. If a data source supplies a string with a unit suffix, preserve that suffix elsewhere and select the documented unit in the form.

Convert back from a dated local time

Set the direction to Date to timestamp and pick the calendar date and time where the event was recorded. Then choose the source region. The time zone rules map the local label to an instant. If the time occurs twice after a rollback, use the earlier or later selection to identify the intended occurrence. If no instant produces the label because it falls in a clock-change gap, the tool shows an input error. The local time checker lists possible instants and offsets if the original log gives you a clue about which one applies.

As a controlled example, 1 January 1970 at 00:00 UTC is Unix 0. On 15 July 2026 at noon Dublin time, Ireland's summer offset puts the instant at 11:00 UTC. Convert from Dublin explicitly. If you choose UTC for the same written 12:00, the numeric result describes an instant one hour later. When a clock label travels between systems, the timestamp and the original civil label should each keep their own context.

Dublin after midnight in summer

The UTC date can be the previous date when the supplied civil zone is ahead.

Conversion direction = Date to timestamp · Unix timestamp = 0 · Timestamp unit = Seconds · Date for conversion = 2026-07-15 · Time for conversion = 00:30 · Date’s time zone = Europe/Dublin · When a local time repeats = Use the earlier occurrence

1784071800 · Unix seconds

  • Unix seconds · 1784071800
  • Unix milliseconds · 1784071800000
  • UTC date · 2026-07-14

The same written clock in UTC

With the zone changed the written clock and date identify a different instant.

Conversion direction = Date to timestamp · Unix timestamp = 0 · Timestamp unit = Seconds · Date for conversion = 2026-07-15 · Time for conversion = 00:30 · Date’s time zone = UTC · When a local time repeats = Use the earlier occurrence

1784075400 · Unix seconds

  • Unix seconds · 1784075400
  • Unix milliseconds · 1784075400000
  • UTC date · 2026-07-15

An Irish rollback entry

Keep the later occurrence with the record. A repeatable check uses its original UTC value instead of choosing by display time alone.

Conversion direction = Date to timestamp · Unix timestamp = 0 · Timestamp unit = Seconds · Date for conversion = 2026-10-25 · Time for conversion = 01:30 · Date’s time zone = Europe/Dublin · When a local time repeats = Use the later occurrence

1792891800 · Unix seconds

  • Unix seconds · 1792891800
  • Unix milliseconds · 1792891800000
  • UTC date · 2026-10-25

Handle negative values and fractional readings

A timestamp of minus one millisecond describes the last millisecond of 1969, not the entire prior second. The Unix seconds row uses whole-second values rounded down to the beginning of their second. The row for Unix milliseconds and the ISO value retain the more precise position. If reading an external API that truncates negative values towards zero, inspect its convention before comparing integer results. The distinction is easy to see close to the epoch and can matter when destroying precision during an import.

For a fractional seconds value such as 1.25, the represented date is 1.250 seconds after the epoch, or 1,250 milliseconds. Use the millisecond row when keeping the decimal position. A source that labels its quantity “epoch milliseconds” is already in that unit. Multiplying by one thousand again would represent a different date. Some systems use monotonic ticks for elapsed performance instead of epoch time. A tick value needs its own reference, and it should not be decoded using the Unix origin unless the specification says it uses that origin.

Reconcile a log with a readable event schedule

Start with one record whose date you know. Decode the value with the specified units and check it against a support entry, receipt or other trusted timestamp. If the output is approximately right but an hour off, inspect whether the source clock or the presentation layer already applied a seasonal offset. If a received record ends with Z, it is already UTC. Use the converter to get its numeric representation directly, and use a separate dated zone conversion only for reading it as a local event.

UTC displays in this tool are based on standard JavaScript date behaviour and include a Z. A Unix value represents the instant independently of what your browser calls its configured zone. If a local date-to-timestamp calculation is made for an important future event, retain the source zone and holiday or clock-change context. The final UTC value can be shared across systems even when those systems display it with different local clocks.

Separate timestamp precision from display precision

For a log which records 1.9999 seconds after the epoch, the browser's dated value is kept at millisecond precision. The UTC label reflects the millisecond that was representable. A rounded integer-second display can lose the information needed to order two events within one second, even when they both belong to the same minute. Save the raw timestamp and its unit when the sequence of events matters. Use the millisecond row to compare an input with another JavaScript system and check its own storage precision separately.

When transforming a large set of records, test 0 and two adjacent negative values before relying on a whole-seconds export. Verify whether the destination represents the whole second with floor or truncation and document the intended choice.

Unix timestamp questions

What is the Unix epoch?

It is the reference instant 1 January 1970 at 00:00:00 UTC. A value of zero in either accepted unit points to that instant. Positive and negative values describe the time after or before it.

How do I know whether a number uses seconds or milliseconds?

Use the source documentation or verify a known event under both interpretations. Contemporary timestamps often differ by roughly three digits in length, but digit count is only a clue and fails near the epoch.

What does a Z at the end of the result mean?

Z identifies UTC in the ISO-style timestamp. The UTC date can differ from a device's local date at the same instant. Keep the Z when sharing an instant with a system that reads the whole label.

Can a timestamp describe a date before 1970?

Yes. Negative numbers move backwards from the epoch. A value of minus one second reaches the final whole second of the preceding UTC date, while minus one millisecond is closer to the start of 1970.

Is a timestamp dependent on the time zone used to display it?

The numeric instant stays the same. Time zones change the local rendering of that instant. When starting with a local time, choose its actual source zone so the tool can identify the correct timestamp.

Why can a local time produce two possible timestamp values?

The clock can repeat an interval during a rollback. Choose the earlier or later occurrence based on the original record. Save the resolved UTC value if the repeat would otherwise remain ambiguous.

Does this tool keep nanosecond precision?

The rendered JavaScript date is precise to milliseconds. Keep a more detailed original value in your source system if it records finer precision. Do not infer those extra digits from the display.

A useful next step