Converters
Convert a date to epoch seconds
Date to Unix converter turns a date into epoch seconds and milliseconds, in your browser. Developers use it when writing token expiries, Redis EXPIREAT arguments and cache keys that need whole-second timestamps. It reads ISO 8601 (2023-11-14T22:13:20Z, or 2023-11-14 22:13 with a space) and free-form dates such as May 17, 2024 12:00. 2023-11-14T22:13:20Z becomes 1700000000, and a date with no time zone is read as UTC unless you switch No time zone given to local time. Leave the box empty to get the current time.
How to use Date to Unix
- Open Date to Unix in the Toolbox101 app.
- Type or paste a date into the
Date and timebox.2023-11-14T22:13:20Zis the safest shape, since the trailingZpins it to UTC. - If your date has no zone, choose in
No time zone givenwhether to read it as UTC (the default) or as your local time. - Read the
Seconds,MillisecondsandISO 8601lines in theOutputbox; they update as you edit the date. - Click
Copyto take the timestamp into your script, API call or cache key.
Worked example
Date to Unix returns the output below for this input.
Input
2023-11-14T22:13:20ZOutput
Seconds: 1700000000
Milliseconds: 1700000000000
ISO 8601: 2023-11-14T22:13:20.000ZCheck it yourself: open Date to Unix and enter the same input.
Frequently asked questions
What time zone does the tool assume for my date?
If the date ends in Z or an offset such as +05:30, that zone is used as written. If it has none, the No time zone given list decides: Read as UTC (the default, so the answer is the same on every machine) or Read as local time, which uses your browser's zone. A date-only value such as 2024-01-01 counts as midnight in whichever zone applies.
Why is my result a 10-digit number?
The Seconds line is the count since the Unix epoch, 1970-01-01 UTC, which is currently around 1.7 billion. It grows by 86,400 a day, so midnight UTC on 2024-01-01 is 1704067200. The Milliseconds line is the same instant times a thousand, 13 digits.
Can it convert dates before 1970?
Yes. Dates before the epoch give negative numbers: 1969-12-31T23:00:00Z is one hour before 1970-01-01T00:00:00Z, so it returns -3600 seconds.
How is this different from the Unix Timestamp converter?
It runs the other direction. Date to Unix takes a date and prints epoch seconds and milliseconds; Unix Timestamp takes an epoch value and prints dates. The two round-trip: paste 2023-11-14T22:13:20Z here for 1700000000, then feed 1700000000 into Unix Timestamp to get the date back.
Use Date to Unix now
Runs in your browser. Nothing you type is uploaded.