All tools

Timestamp converter

Convert Unix timestamps and readable dates.

Timestamp converter
Timestamp or dateTEXT

Press Command or Control plus Enter to run. Tab inserts indentation; press Escape, then Tab, to leave the editor.

Result
Your result will appear here.
Ready1 line · 10 chars

About the Timestamp converter

A Unix timestamp (also called epoch time) counts the time since 00:00:00 UTC on 1 January 1970. Servers, databases, logs and APIs often store dates this way because a single number is easy to compare and doesn't depend on time zones.

This converter turns a timestamp into readable dates and turns a date string back into a timestamp. Results are shown as ISO 8601, a UTC date, Unix seconds and Unix milliseconds.

How to use the Timestamp converter

  1. Paste a Unix timestamp such as 1716000000, or a date such as 2024-05-18T02:40:00Z, into the editor.
  2. Click Convert timestamp or press Ctrl + Enter (Cmd + Enter on Mac).
  3. Read the ISO 8601, UTC, seconds and milliseconds values in the result.
  4. Copy the format you need.

Examples

Unix seconds to a date

Input

1767225600

Output

ISO 8601   2026-01-01T00:00:00.000Z
UTC        Thu, 01 Jan 2026 00:00:00 GMT
Unix (s)  1767225600
Unix (ms) 1767225600000

JavaScript milliseconds to a date

Input

1767225600000

Output

ISO 8601   2026-01-01T00:00:00.000Z
UTC        Thu, 01 Jan 2026 00:00:00 GMT
Unix (s)  1767225600
Unix (ms) 1767225600000

Values with 12 or more digits are read as milliseconds, so both inputs give the same moment.

Common errors and how to fix them

The date shows January 1970

A millisecond value was read as seconds somewhere else, or seconds were passed to new Date(), which expects milliseconds. Multiply seconds by 1000 before new Date(seconds * 1000).

The time is off by a few hours

The timestamp is UTC but it's being shown in local time, or the reverse. Unix timestamps never have a time zone; only the display does. Compare against the UTC line.

Invalid Date

The date string isn't in a format JavaScript can parse reliably. Use ISO 8601, for example 2026-01-01T09:30:00Z, rather than 01/02/2026, which is ambiguous.

Good to know

  • Numbers below 100,000,000,000 are treated as seconds; larger numbers are treated as milliseconds. This covers dates from 1973 onwards in either unit.
  • All results are shown in UTC, not your local time zone.
  • For date strings, ISO 8601 with a time zone (for example ending in Z or +05:30) gives the most reliable result. A date with a time but no time zone is read in your local time zone, while a date on its own, such as 2024-05-18, is read as UTC.

Frequently asked questions

How do I know if a timestamp is in seconds or milliseconds?

Current timestamps in seconds have 10 digits, and in milliseconds they have 13. JavaScript uses milliseconds; most Unix tools, databases and JWTs use seconds.

What is the year 2038 problem?

Systems that store Unix time as a signed 32-bit number can only count up to 19 January 2038. Modern systems use 64-bit numbers, which avoids the problem.

Does a Unix timestamp include a time zone?

No. A Unix timestamp is always relative to UTC. Time zones only matter when you display it as a calendar date.