Developer
Encoders, converters & dev utilities
Convert Date & Time to Unix Timestamp
Turn a calendar date and time into a Unix (epoch) timestamp — the number of seconds since 1970-01-01T00:00:00Z (UTC). Pick a date, time, and timezone and the tool computes the absolute epoch value that databases, logs, and APIs store. Because Unix time is UTC-based, the same wall clock in different timezones produces different epoch values, so the timezone you choose matters. Worked example: 2024-01-01T00:00:00Z converts to 1704067200. The result is available in both seconds and milliseconds (×1000), plus copy-ready code snippets. Everything runs in your browser. Free, no login.
Date → Unix = seconds from 1970-01-01T00:00:00Z (UTC) to your chosen instant (timezone-aware)
- Byte-exact worked example: 2024-01-01T00:00:00Z → 1704067200
- In JavaScript: Math.floor(Date.parse("2024-01-01T00:00:00Z") / 1000) — parse gives ms, so divide by 1000
- Result offered in both seconds (10 digits) and milliseconds (13 digits, × 1000)
- Timezone matters: the same wall-clock time in a different zone gives a different epoch; 100% client-side
Frequently asked questions
How do I convert a date to a Unix timestamp?
Enter the date and time and choose a timezone; the tool computes the number of seconds from 1970-01-01T00:00:00Z (UTC) to that instant. For example 2024-01-01T00:00:00Z is 1704067200. In JavaScript the equivalent is Math.floor(Date.parse("2024-01-01T00:00:00Z") / 1000), since Date.parse returns milliseconds. The calculation runs in your browser and gives you both the seconds and milliseconds forms.
Why does the timezone I pick change the timestamp?
Because a Unix timestamp is an absolute instant in UTC, but a wall-clock time like "2024-01-01 00:00" means a different real moment depending on the timezone. Midnight in London and midnight in New York are five hours apart, so they map to two different epoch values. Selecting the correct timezone (or entering the time in UTC) ensures you get the epoch value for the instant you actually mean.
Do I want seconds or milliseconds?
It depends on the system consuming the value. Classic Unix APIs, most databases, and JWT claims use seconds (a 10-digit number). JavaScript Date, and many JSON APIs, use milliseconds (13 digits) — you get that by multiplying the seconds value by 1000. This tool shows both so you can copy whichever the target expects; mixing them up is the most common epoch bug.