About the Unix Timestamp Converter
A Unix timestamp (also called epoch time or POSIX time) counts the seconds since 1 January 1970 00:00:00 UTC. It is how most databases, log files, APIs and programming languages store moments in time, but it is hard to read: 1700000000 is 14 November 2023, 22:13:20 UTC.
This converter shows a timestamp as a readable date in UTC and in your own time zone, works out how long ago or how far ahead it is, and converts a date and time back into a timestamp. It recognises seconds, milliseconds, microseconds and nanoseconds automatically. All calculations run in your browser.
How to use it
- The current Unix time is shown at the top in seconds and milliseconds; use Copy to grab either value.
- To read a timestamp, paste it into "Timestamp". The unit is detected from the number of digits; choose it under "Unit" if the guess is wrong.
- Read the result in UTC, in your time zone, as ISO 8601 and relative to now.
- To create a timestamp, pick a date and time under "Date to timestamp" and choose whether that time is your local time or UTC.
- Copy the seconds, milliseconds or ISO 8601 value you need.
Features
- Automatic unit detection: Seconds, milliseconds, microseconds and nanoseconds are recognised by their length, with a manual override.
- UTC and local time side by side: See the same moment in UTC and in the time zone your device is set to, including the zone name.
- Relative time: Know at a glance whether a token expiry or log entry is "in 3 hours" or "2 days ago".
- Both directions: Convert timestamps to dates and dates to timestamps in seconds, milliseconds and ISO 8601.
- Dates before 1970: Negative timestamps for dates before the epoch are supported.
Examples
Reading a log entry
A log line contains 1793093400. Paste it to see Tue, 27 Oct 2026 09:30:00 UTC and the same moment in your local time.
JavaScript milliseconds
Date.now() returns 13 digits, such as 1793093400000. The converter detects milliseconds and shows the same date as above.
Setting an expiry time
An API needs an expiry date as a Unix timestamp. Pick the date and time, choose UTC, and copy the value in seconds.
Limitations and notes
- Only UTC and the time zone of your device are shown; other time zones cannot be selected.
- Unit detection is based on the number of digits. Millisecond values for dates before March 1973 are short enough to look like seconds – choose Milliseconds under Unit in that case.
- Microsecond and nanosecond values are shown to the millisecond; smaller parts are dropped.
- Browsers can only display dates within about 273,000 years of 1970 (±8.64e15 milliseconds).
- Leap seconds are not counted, exactly as in Unix time itself.
Frequently asked questions
What is the Unix epoch?
It is the reference point 1 January 1970 00:00:00 UTC. A Unix timestamp is the number of seconds (or milliseconds) since that moment.
How do I know if a timestamp is in seconds or milliseconds?
Current timestamps in seconds have 10 digits and in milliseconds 13 digits. Microseconds have 16 and nanoseconds 19 digits. The converter uses this to pick the unit automatically.
Does a Unix timestamp depend on the time zone?
No. A timestamp is the same everywhere; only the way it is displayed as a local date and time changes with the time zone.
What happens in 2038?
Systems that store Unix time as a signed 32-bit number overflow on 19 January 2038 at 03:14:07 UTC. This converter uses arbitrary-size integers, so later dates work fine.