Date to Unix Timestamp Converter

Convert a date and time to a Unix timestamp in seconds and milliseconds. Enter any UTC date and time and get the epoch value instantly.

Independently verified for accuracy

Calculator by Toolsloft ↗
Unix timestamp (seconds)
1609459200
Milliseconds
1609459200000
ISO 8601 (UTC)
2021-01-01T00:00:00Z

A Unix timestamp is the number of seconds since January 1, 1970 UTC, the format most databases and APIs use to store time. Enter a date and an optional time and this converter returns the timestamp in both seconds and milliseconds, along with the matching ISO 8601 string.

How this is calculated

The date is converted to a day count since the Unix epoch (1970-01-01), multiplied by 86,400 seconds per day, then the hours, minutes, and seconds of the time are added. The input is treated as UTC, so the result matches epoch time with no timezone offset. Milliseconds are the seconds value times 1,000.

How to use

  1. Enter the date in YYYY-MM-DD format.
  2. Enter the time in HH:MM or HH:MM:SS, or leave it at midnight.
  3. Read the Unix timestamp in seconds and milliseconds.

Examples

  • 2021-01-01 00:00:00 UTC: Timestamp 1609459200 seconds
  • 2000-06-15 12:30:00 UTC: Timestamp 961072200 seconds

FAQ

What is a Unix timestamp?
It is a single number counting the seconds elapsed since midnight UTC on January 1, 1970, called the Unix epoch. It gives systems a timezone-free way to store and compare points in time.
Is the time treated as local or UTC?
As UTC. The converter does not apply any timezone offset, so the timestamp matches the date and time exactly as entered in Coordinated Universal Time.
Why do some systems use milliseconds?
JavaScript and many web APIs store time in milliseconds since the epoch for finer resolution. The tool shows both seconds and milliseconds so you can use whichever your system expects.

Embed this calculator

Add this free calculator to your own site. Copy the code and paste it where you want it to appear.