Date to Timestamp Converter
Turn a calendar date and a wall-clock time into a Unix timestamp, read in whichever time zone you choose.
One timestamp or date per line, up to 500.
Paste the code into a Discord message; everyone sees it in their own time zone and language.
Convert this timestamp in your own code.
Convert a Date to a Unix Timestamp
Code stores time as a number, but the time you have in hand usually arrives as a date: a deadline in an email, a row in a spreadsheet, the start of a maintenance window. Going from one to the other is the job of the right-hand pane of the Timestamp Converter, and this page opens it with a date already in place so you can see the shape of the answer before you type your own.
The result has four lines. The first repeats the date and time the tool read, with the <abbr title="Coordinated Universal Time">UTC offset it applied, so you can check the zone before you trust the number. Then comes the timestamp in seconds, the same instant in milliseconds, and a UTC rendering as a second sanity check. Nothing is uploaded; the arithmetic happens in the page.
The time you type belongs to a zone
A date box holds a wall-clock reading: year, month, day, hour, minute, second. That is not yet an instant. "1 January 2025 at midnight" happened at a different moment in Tokyo than in New York, and only a time zone settles which one you mean. The tool reads your entry as local time in the zone picked at the top right, applies that zone's offset for that date, and hands back the instant. Change the zone and the conversion re-runs by itself.
| Zone selected | Offset on that date | Timestamp for 2025-01-01 00:00:00 |
|---|---|---|
| UTC | UTC+00:00 | 1735689600 |
| Europe/Berlin | UTC+01:00 | 1735686000 |
| Asia/Tehran | UTC+03:30 | 1735677000 |
| Asia/Tokyo | UTC+09:00 | 1735657200 |
| America/New_York | UTC-05:00 | 1735707600 |
The offsets come from the browser's zone database, so daylight saving is already accounted for: the same 09:00 in Europe/Berlin is UTC+01:00 in January and UTC+02:00 in July, and you do not have to remember which. A fixed offset typed into a script is the usual source of dates that are right for half the year and wrong for the other half.
Seconds, milliseconds and what the box can hold
The seconds value is the milliseconds value with the fraction dropped, so both lines always name the same instant. The date box accepts whole seconds and no finer, which means a timestamp produced here ends in three zeros when read as milliseconds. If you need sub-second precision, the number has to come from the system that recorded the event rather than from a picker.
Doing the same thing in code
The Code tab under the converter prints the conversion in JavaScript, Python, PHP, SQL, Go, Java, C# and Bash, and each snippet ends with the line that produces a fresh timestamp in that language. Two traps survive the move into code: a naive string such as 2025-01-01T00:00:00 is read in the time zone of whatever machine runs it, usually UTC on a server rather than yours, and MySQL's UNIX_TIMESTAMP() interprets its argument in the session zone. Attach an offset or convert through a named zone in both cases.
The other direction, and nearby pages
The left-hand pane reads a number back as a date, which is the quickest way to prove a conversion: paste what you just copied and see whether the date returns. That direction has its own page, Timestamp to Date, as does the thirteen-digit case at milliseconds to date. For the value for right now there is the current Unix timestamp in the toolbar, and for a chat announcement, Discord timestamps wraps the seconds in the markup Discord renders per reader.