How to use the timestamp converter
- Timestamp → Date: paste a Unix timestamp and leave the unit on Auto or choose seconds, milliseconds or microseconds. The result shows the unit that was used, the date in UTC and the same instant in your browser's time zone, labelled with its name and UTC offset.
- Date → Timestamp: type a date as YYYY-MM-DD, optionally followed by a time such as 14:30, 14:30:00 or 14:30:00.250, and say whether it is local time or UTC. You get the timestamp in seconds and in milliseconds, plus the date in UTC and in local time.
A Unix timestamp counts the seconds since 1 January 1970 at 00:00:00 UTC, the Unix epoch. Every day counts as exactly 86,400 seconds, because Unix time ignores leap seconds. Dates before 1970 are negative numbers. Many systems use milliseconds instead (JavaScript's Date.now(), Java) or microseconds (some databases and tracing tools), which is why the unit matters so much.
How Auto chooses the unit
Auto counts the digits before the decimal point, ignoring a minus sign and leading zeros: up to 11 digits are read as seconds, 12 to 14 as milliseconds and 15 to 17 as microseconds. So 1707782400 is seconds, 1707782400000 is milliseconds and 1707782400000000 is microseconds, and all three show 2024-02-13T00:00:00.000Z. For 18 digits or more, Auto asks you to choose the unit.
The rule is right for every seconds timestamp up to the year 5138, and for millisecond and microsecond timestamps from 1973-03-03T09:46:40.000Z onwards. Earlier millisecond values have too few digits: 86400000 milliseconds is one day after the epoch, 1970-01-02T00:00:00.000Z, but Auto reads it as seconds and shows 1972-09-27T00:00:00.000Z. When a millisecond or microsecond value is that close to zero, positive or negative, choose the unit yourself.
Notable timestamps
| Seconds | Milliseconds | UTC (ISO 8601) | Why it matters |
|---|---|---|---|
| -2147483648 | -2147483648000 | 1901-12-13T20:45:52.000Z | Smallest signed 32-bit value |
| 0 | 0 | 1970-01-01T00:00:00.000Z | The Unix epoch |
| 1000000000 | 1000000000000 | 2001-09-09T01:46:40.000Z | One billion seconds |
| 1234567890 | 1234567890000 | 2009-02-13T23:31:30.000Z | Digits 1 to 0 in order |
| 2147483647 | 2147483647000 | 2038-01-19T03:14:07.000Z | Largest signed 32-bit value (the year 2038 problem) |
| 4294967295 | 4294967295000 | 2106-02-07T06:28:15.000Z | Largest unsigned 32-bit value |
The year 2038 problem
Systems that store seconds in a signed 32-bit integer can count only up to 2,147,483,647, which is 2038-01-19T03:14:07.000Z. One second later the value overflows to −2,147,483,648 and the date jumps back to 1901-12-13T20:45:52.000Z. Most current platforms use 64-bit time, but old embedded devices, file formats and database columns may not. This converter is not limited to 32 bits: it accepts anything a JavaScript date can hold, the years −271821 to 275760.
Worked examples
- Fractions of a second:
1707782400.25seconds is 2024-02-13T00:00:00.250Z. Seconds take up to six decimal places and milliseconds up to three, so values are exact to the microsecond and never rounded:1707782400.1234567is rejected rather than cut. - A date in UTC:
2024-02-14with UTC selected is 1707868800 seconds, because a date without a time means midnight. - A date with an offset:
2024-02-14T12:00:00+05:30is 1707892200 seconds. AZor an offset at the end always wins over the local/UTC choice. - Milliseconds in a date:
2024-02-14T12:00:00.250in UTC is 1707912000.25 seconds.
Time zones and daylight saving time
A timestamp is the same everywhere; only the wall-clock reading changes with the time zone. When you convert a local date, the converter uses the zone your browser reports and applies its daylight-saving rules for that particular date, not today's offset. Two situations need care:
- Times that do not exist. When clocks spring forward, an hour is skipped. In a browser set to New York,
2024-03-10T02:30gives the error: 2024-03-10 02:30:00 does not exist in America/New_York: the clocks skip that time (daylight saving time change). Choose UTC or another time. - Times that happen twice. When clocks fall back, an hour repeats.
2024-11-03T01:30in New York is 1730611800 seconds the first time and 1730615400 seconds an hour later. The converter shows the earlier one and mentions the later one below the result.
Common pitfalls
- Wrong unit. Reading milliseconds as seconds lands tens of thousands of years in the future:
1707782400000as seconds is +056087-06-21T00:00:00.000Z. Reading seconds as milliseconds lands in January 1970: 1970-01-20T18:23:02.400Z. - Leap seconds. A time such as 23:59:60 is rejected, because Unix time has no slot for it.
- Formatted numbers. Thousands separators, a plus sign and exponents such as
1e9are not accepted: type the digits only.
Frequently asked questions
Is a Unix timestamp in UTC?
A timestamp has no time zone: it counts seconds from an instant defined in UTC. Converting it to a date is where a zone comes in, which is why the result shows both UTC and your local time.
Which date formats can I type?
Only ISO 8601 style: YYYY-MM-DD, then optionally T or a space and a time, then optionally Z or an offset such as +05:30 or +0530. Formats like 14/02/2024 are ambiguous between countries and are rejected.
Why is the local time different on another computer?
Local time follows the time zone of the browser that runs the page. Share the UTC value or the timestamp when several people need to agree on an instant.
Does the converter check that a date exists?
Yes. 2023-02-29 gives: 2023-02-29 does not exist: February 2023 has 28 days.