How to use Convert Unix ↔ Date

  1. Under Conversion Mode, choose Unix → Date or Date → Unix.
  2. Under Timezone Options, choose Use Local Time or Use UTC (the default). In Unix → Date with UTC, Add 'UTC' suffix is checked by default and adds UTC after each date. Uncheck it to leave the suffix out.
  3. Enter one Unix timestamp in seconds, or one date such as 2025-04-04 10:00:00 +08:00, per line. You can also click Select files to load a text file.
  4. The result updates as you type. Click Copy to clipboard, or click Download to save it as a .txt file.

Examples

Timestamp to UTC date

1721287227 with Unix → Date, Use UTC and Add 'UTC' suffix gives 2024-07-18 07:20:27.000 UTC.

Date with an offset to timestamp

2025-04-04 10:00:00 +08:00 with Date → Unix gives 1743732000, which is 02:00 UTC on that day.

Date without a time

2012-12-21 with Date → Unix and Use UTC gives 1356048000, midnight UTC on that date.

Good to know

  • Unix → Date reads timestamps in seconds. A value longer than 10 characters, such as a 13-digit millisecond timestamp, returns 'ms not supported, divide by 1000'.
  • UTC results use the format YYYY-MM-DD HH:MM:SS.000 and always include milliseconds. Local-time results use YYYY-MM-DD HH:MM:SS.
  • Lines that cannot be converted, such as text or negative timestamps, give an empty output line, so the results stay aligned with the input lines.
  • Date → Unix uses an offset at the end of the line, such as +08:00, -05:30 or Z (hours 00-14, minutes 00, 15, 30 or 45). Without an offset, the date is read as UTC. A date with no time is read as midnight.
  • In Date → Unix, Use Local Time applies your browser's current UTC offset and ignores any offset typed in the input.

Frequently asked questions

How do I convert a timestamp in milliseconds?

Divide it by 1000 first, for example by removing the last three digits. This converter accepts seconds only, and inputs longer than 10 characters return 'ms not supported, divide by 1000'.

Which time zone is used when converting a date to a Unix timestamp?

If the line ends with an offset such as +08:00 or Z, that offset is used. Otherwise UTC is used. With Use Local Time selected, the browser's offset at the moment you convert is applied instead, so a date on the other side of a daylight saving change can be off by the DST difference.

Can I convert many values at once?

Yes. Put one timestamp or date on each line. Each line is converted separately, and lines that cannot be converted are left blank in the output.

More Time Tools