Date to Unix Timestamp Converter

Convert a date and time into a Unix timestamp in seconds and milliseconds, along with the matching UTC date. It works with UTC or with the time zone of your device.

1 Fill in the boxes

2 Your answer

Your answer shows here as you type.

How to use the Date to Unix Timestamp Converter

  1. Pick a date and time, or type it in the date field.
  2. Choose UTC, or local time if the date is in your own time zone.
  3. Copy the seconds value for most APIs, or the milliseconds value for JavaScript.

Frequently asked questions

What is a Unix timestamp?

A Unix timestamp counts the seconds elapsed since 00:00:00 UTC on 1 January 1970, known as the Unix epoch. Leap seconds are not counted.

Is a Unix timestamp in seconds or milliseconds?

Classic Unix time is in seconds. JavaScript's Date and many web APIs use milliseconds, which is the seconds value multiplied by 1000.

How do I convert a local date to a Unix timestamp by hand?

Convert the local time to UTC by subtracting the UTC offset. For example, at UTC+2, subtract two hours. Then count the seconds from 00:00:00 UTC on 1 January 1970.

Why does the same date give different timestamps in different time zones?

The same wall-clock time in two zones is two different moments, so their timestamps differ by the offset in seconds. A given moment has the same timestamp everywhere.

Wrote something with AI? Slop Monkey rewrites it so it sounds like you, and keeps your facts.