Date & Timestamp Converter
conversion / date Date & Timestamp Converter
Convert a Unix timestamp to a readable date and back, in any time zone. The unit is detected automatically — seconds, milliseconds, microseconds, or nanoseconds — and the result is shown as ISO 8601, RFC 2822, local and UTC time, plus how long ago it was. A date difference calculator reports the span between two dates in every unit. Everything runs in your browser.
What a unix timestamp is
A Unix timestamp counts seconds since 1970-01-01T00:00:00Z. POSIX defines that count to exclude leap seconds, which is what makes it arithmetic rather than calendrical: every day is exactly 86,400 seconds long by definition, even the ones that were not. Leap seconds themselves are inserted under ITU-R TF.460, and a Unix timestamp simply does not represent them — the same value covers both the leap second and the second after it.
The formatted output follows ISO 8601, whose internet profile is RFC 3339. Prefer that form in anything machine-read: it sorts lexicographically, it is unambiguous about offset, and it avoids the day/month ordering that makes 03/04 mean two different dates on two sides of an ocean.
A Unix timestamp counts seconds since 1970-01-01T00:00:00Z. POSIX defines that count to exclude leap seconds, which is what makes it arithmetic rather than calendrical: every day is exactly 86,400 seconds long by definition, even the ones that were not. Leap seconds themselves are inserted under ITU-R TF.460, and a Unix timestamp simply does not represent them — the same value covers both the leap second and the second after it.
The formatted output follows ISO 8601, whose internet profile is RFC 3339. Prefer that form in anything machine-read: it sorts lexicographically, it is unambiguous about offset, and it avoids the day/month ordering that makes 03/04 mean two different dates on two sides of an ocean.
A count of seconds since midnight UTC on 1 January 1970, called the Unix epoch. Because it is a single number with no time zone and no calendar rules attached, it is unambiguous everywhere — which is why logs, databases, and APIs store time this way and leave the formatting to the display layer.
The awkward part is that a bare number carries no indication of its precision. A ten-digit number is almost certainly seconds; thirteen digits is milliseconds, the unit JavaScript uses natively. Sixteen and nineteen digits are microseconds and nanoseconds, common in tracing systems and in Go. This tool infers the unit from the magnitude, and you can override it if the guess is wrong.
Reading the output
- ISO 8601—
2025-01-01T00:00:00.000Z. The format to use when passing a date between systems: sortable as text, unambiguous, and understood everywhere. The trailingZmeans UTC. - RFC 2822— the format used in email headers and older HTTP headers.
- Local— the same instant rendered in the time zone you select, which defaults to your own.
- Relative— how far the instant is from now, in plain English.
- Week number— the ISO 8601 week, where weeks begin on Monday and week 1 is the week containing 4 January. This is not the same as the US convention, which starts weeks on Sunday.
Common uses
- Reading a log line.Structured logs record timestamps as numbers; converting one tells you when an incident actually happened.
- Checking a token's expiry.The
expandiatclaims in a JWT are Unix timestamps in seconds. - Debugging a scheduled job.Confirm whether a cron entry or a queue item fired when you expected, in the zone the server actually uses.
- Writing a test fixture.Turn a readable date into the exact number a test needs to assert against.
- Working out a deadline.The difference calculator gives the span between two dates in days, weeks, and months at once.
Things that trip people up
- Seconds versus milliseconds.The single most common bug in date handling. A seconds value treated as milliseconds lands in January 1970; a milliseconds value treated as seconds lands tens of thousands of years in the future.
- Time zones are not fixed offsets.
Europe/Londonis UTC in winter and UTC+1 in summer. Storing an offset instead of a zone loses the rules that govern when it changes. - Some local times do not exist.When clocks spring forward, an hour is skipped entirely; when they fall back, an hour repeats and one local time maps to two instants.
- "A month" is not a fixed length.The difference calculator counts whole calendar months, so 15 January to 14 March is one month and change, not two — the second month has not completed.
- The year 2038.A signed 32-bit second counter overflows on 19 January 2038. Anything still storing timestamps in 32 bits will need to move to 64 before then.
Frequently asked questions
How is the unit detected?
Does it handle dates before 1970?
Why does the local time differ from my computer's clock?
What about leap seconds?
Is any of this sent to a server?
Standards and references
- ISO 8601-1:2019 Date and time — Representations for information interchange 2019
- RFC 3339 Date and Time on the Internet: Timestamps 2002
- IEEE 1003.1 POSIX — the definition of seconds since the Epoch, which excludes leap seconds 2018
- ITU-R TF.460-6 Standard-frequency and time-signal emissions — leap second insertion 2002