Timestamp Converter
Convert between Unix timestamps and datetime
About Timestamp Converter
Unix timestamps are integers that count seconds elapsed since 1970-01-01T00:00:00Z (UTC). JavaScript's `Date.now()` returns milliseconds — a common source of off-by-1000 bugs. This tool converts both formats bidirectionally to ISO 8601, local time, and back, so you can inspect log entries, JWT claims, and API responses without writing a throwaway script.
Common Use Cases
Frequently Asked Questions
Seconds or milliseconds — how do I tell which one I have?
A 10-digit number is almost certainly seconds (Unix epoch in seconds crossed 10 digits in 2001). A 13-digit number is milliseconds, as returned by JavaScript `Date.now()` and Java `System.currentTimeMillis()`. If you feed a 13-digit value to a function expecting seconds, you get a date around the year 2286.
Should I always store UTC?
Yes. Store UTC in the database, transmit Unix seconds in APIs, and convert to the user's local timezone only at the presentation layer. Storing local times causes irreversible ambiguity around DST transitions.
What is the year-2038 problem?
Signed 32-bit integers max out at 2147483647, which corresponds to 2038-01-19T03:14:07Z. Systems that store timestamps as `int32` will overflow on that date. Modern systems use `int64`, which won't overflow for roughly 292 billion years.
What does the Z at the end of an ISO 8601 string mean?
Z is the UTC timezone designator (short for Zulu time). `2026-04-13T15:30:00Z` means 15:30 UTC. Without a timezone suffix, an ISO 8601 string is ambiguous — always include Z or an explicit offset such as +08:00.
Is JavaScript's Date API reliable for timestamp math?
It works but has sharp edges: month indices are 0-based, timezone support is inconsistent, and parsing of non-ISO strings is implementation-defined. The TC39 Temporal API (stage 3) addresses all of this; use `date-fns` or `Luxon` in production code until Temporal is widely available.