Unix Timestamp Converter
Convert a Unix timestamp into a date and compare ISO 8601, seconds, milliseconds, and device-local time.
How to use
- Enter a Unix timestamp.
- Calculate.
- Compare the UTC ISO string, device-local display, seconds, and milliseconds.
Capabilities and scope
This epoch-time converter makes numeric timestamps readable. Inputs up to 10 characters long are treated as seconds; longer inputs are treated as milliseconds.
How it works
A value whose string length is at most 10 is multiplied by 1000 to become JavaScript epoch milliseconds; longer values are used directly as milliseconds. The displayed seconds value is the millisecond epoch divided by 1000 and floored.
Example
Input 0 represents the Unix epoch, 1970-01-01T00:00:00.000Z.
Useful for
- Read epoch values from API logs
- Compare second and millisecond timestamps
- See the same instant in UTC and device-local form
Before you use it
- Second-versus-millisecond detection is based on character count, so negative values or 11-digit second timestamps in the distant future can be interpreted differently than intended.
Standards and references
Frequently asked questions
How does it distinguish seconds from milliseconds?
The current implementation treats input strings of 10 characters or fewer as seconds and longer strings as milliseconds.
Which time zone is displayed?
The ISO value is UTC; the local-time row uses the current browser device time zone.