{ }
中文

Timestamp Converter

Convert between Unix timestamps and human-readable dates.

About Unix Timestamps

A Unix timestamp is the number of seconds that have elapsed since the Unix Epoch — January 1, 1970 00:00:00 UTC. It is the canonical representation of a single moment in time used by almost every database, programming language, and network protocol because it is timezone-agnostic, monotonic, and trivially sortable. JavaScript and many high-resolution APIs use the millisecond variant, which is the same value multiplied by 1000.

This tool accepts either a Unix timestamp (10 digits for seconds, 13 digits for milliseconds) or any string the JavaScript Date constructor understands — ISO 8601 dates, RFC 2822 strings, and a handful of regional formats. It then renders the moment in five forms simultaneously so you can copy whichever your downstream system expects.

Use cases

  • Translate a timestamp from logs or a database into a readable date in your timezone.
  • Check whether a timestamp is stored in seconds or milliseconds.
  • Generate a timestamp for an API request that requires epoch time.
  • Compare two events by seeing their ISO 8601 UTC values side by side.
  • Convert an ISO 8601 timestamp to its Unix equivalent before storing it in a numeric column.

Best practices

  • Store timestamps in UTC at the database layer; convert to the user's timezone only at the presentation layer.
  • Prefer ISO 8601 strings in JSON APIs — they are unambiguous and human-readable.
  • Use 64-bit integers for timestamps to avoid the Year 2038 overflow that affects 32-bit signed values.
  • Be explicit about the unit (seconds vs milliseconds) in every API contract.

Frequently asked questions

Seconds or milliseconds — which should I use?
Unix standard is seconds. JavaScript's Date.now() uses milliseconds. A 13-digit number is almost always milliseconds; a 10-digit number is seconds.
Is a Unix timestamp timezone-aware?
No. It is always counted from the UTC epoch. Conversion to a local clock time is done when you display it.
What is the Year 2038 problem?
Signed 32-bit timestamps overflow in January 2038. Use 64-bit integers (or a language runtime that does) to stay safe.
Why does ISO 8601 end with a Z?
Z stands for "Zulu time" — military shorthand for UTC. It is equivalent to the offset +00:00.