Unix Timestamp Generator
The current moment in every format you are likely to need: Unix seconds and milliseconds, ISO 8601, UTC, SQL datetime and RFC 2822.
Your data never leaves your browser. This tool runs entirely on your device.
Seconds or milliseconds?
A Unix timestamp is conventionally a count of seconds since 1 January 1970 UTC. JavaScript is the notable exception: Date.now() returns milliseconds, which is a factor of 1000 larger.
This mismatch is one of the most common date bugs in web development. A millisecond value read as seconds lands about 50,000 years in the future; a seconds value read as milliseconds lands in January 1970.
seconds → 10 digits (until 2286) milliseconds → 13 digits
Why timestamps are always UTC
A Unix timestamp counts seconds from a fixed instant, so it has no time zone. The same value describes the same moment everywhere in the world, which is exactly why it is the right thing to store.
Convert to a local time zone only when displaying to a user. Storing local times causes ambiguity twice a year, when the hour before a daylight-saving change repeats.
The 2038 problem
Systems storing timestamps in a signed 32-bit integer overflow at 03:14:07 UTC on 19 January 2038, wrapping to 1901. Modern platforms use 64-bit values and are unaffected, but embedded systems and old file formats can still be exposed.
Frequently asked questions
What is a Unix timestamp?
The number of seconds elapsed since 00:00:00 UTC on 1 January 1970, known as the Unix epoch. It is a single number with no time zone, which makes it unambiguous to store and compare.
Why does JavaScript give a much bigger number?
Date.now() returns milliseconds rather than seconds, so it is 1000 times larger. Divide by 1000 and floor it to get a conventional Unix timestamp.
Do Unix timestamps account for leap seconds?
No. Unix time deliberately pretends every day has exactly 86,400 seconds, so a leap second is either repeated or skipped. This keeps arithmetic simple at the cost of a sub-second discrepancy with atomic time.
What time zone is a Unix timestamp in?
None — it is an absolute count from a fixed instant, which is equivalent to UTC. A time zone is applied only when formatting it for display.
Related tools
- Unix Timestamp ConverterConvert a Unix timestamp to a readable date in every common format, or go the other way. Seconds and milliseconds are detected automatically.
- UUID GeneratorGenerate UUIDs in bulk. Version 4 is fully random; version 7 begins with a timestamp so the values sort chronologically. Both use your browser's secure random source.
- JWT DecoderPaste a JSON Web Token to read its header and payload. Timestamp claims are expanded into readable dates, and the token never leaves your browser.
- Date Difference CalculatorCount the time between two dates in days, weeks and months, with a separate weekday-only total for working out business days.