How to Convert Unix Timestamps to Dates and Dates Back to Epoch Seconds
Learn how to read an epoch value as UTC, local and ISO 8601 time, and how to turn a calendar date into seconds or milliseconds for APIs and logs.
Unix Timestamp Converter
Introduction
Logs, tokens and database rows store time as a count of seconds or milliseconds since 1 January 1970, which is precise but unreadable. The Unix Timestamp Converter turns an epoch number into UTC, local and ISO 8601 strings, and converts a picked date and time back into seconds and milliseconds. It also shows a live current epoch counter. All conversions happen in the browser.
Step-by-Step Instructions
- Read the Current Unix Epoch Time counter at the top, which ticks every second.
- Click Use Current Time to drop the live value into the Timestamp to Human Date input.
- Enter any epoch value in seconds or milliseconds in that input and read the UTC, Local and ISO 8601 lines.
- Pick a date and time in the Human Date to Timestamp field using the browser's date-time control.
- Read the Seconds and Milliseconds results and copy the one the target system expects.
Key Use Cases
- Log investigation: Translate a raw epoch value from a server log into a local time to match it with a user report.
- API testing: Generate the exact seconds value for a future expiry date to send in a request body.
- Data migration: Check whether a column stores seconds or milliseconds before writing the import script.
Frequently Asked Questions
How does the tool know whether the input is seconds or milliseconds?
Values above 100,000,000,000 (1e11) are treated as milliseconds and anything smaller as seconds. That threshold sits far beyond any present-day seconds value, so 13-digit JavaScript timestamps and 10-digit Unix timestamps are both detected without a toggle.
Which time zone is used for the Local line and the date picker?
The Local line uses the time zone of the browser and device, formatted with the system locale. The date-time picker is also interpreted in that local zone, so the Seconds and Milliseconds results reflect the local wall clock time you select. The UTC and ISO 8601 lines are always in UTC.
What inputs show Invalid timestamp or Invalid date input?
Blank, non-numeric or out-of-range timestamp values show Invalid timestamp. The date picker shows Invalid date input if it is cleared or the browser cannot parse the chosen value. Negative numbers are accepted and resolve to dates before 1970.