How it works
A Unix timestamp counts seconds (or milliseconds) since 1970-01-01 00:00:00 UTC, the epoch. Because it is a single monotonic number with no timezone or calendar ambiguity, it is the lingua franca of logs, databases and APIs. This converter works in both directions: paste a timestamp to get local time, UTC, ISO 8601 and a human relative phrase, or pick a date and get the corresponding epoch value.
Seconds and milliseconds are both supported explicitly — a classic source of bugs. JavaScript's Date works in milliseconds, while most server logs and APIs use seconds. A 13-digit value is almost certainly milliseconds; 10 digits, seconds. Selecting the wrong unit throws the result off by a factor of a thousand, landing dates in 1970 or the far future.
The converter shows four renderings at once: your locale's date-time, UTC, machine-friendly ISO 8601, and a relative expression such as “3 days ago”. The relative phrasing is what you actually want when scanning logs; the ISO string is what you paste into code and documents.
A live panel displays the current epoch seconds, epoch milliseconds, ISO and UTC time, refreshed continuously — handy when you need “now” for a test fixture. All conversion uses the browser's Date; nothing is sent anywhere.
Worked example
Convert 1709000000 as seconds. The tool multiplies by 1000 for JavaScript and renders the four formats.
| Format | Output | Used for |
|---|---|---|
| Local | Tue Feb 27 2024, 01:53:20 (your timezone) | Reading logs as a human in your location. |
| UTC | Tue, 27 Feb 2024 00:53:20 GMT | Comparing events across machines and timezones. |
| ISO 8601 | 2024-02-27T00:53:20.000Z | APIs, databases and documents. |
| Relative | months ago | Quick log scanning. |
- Identify the unit: 10 digits means seconds, 13 means milliseconds; set the selector accordingly.
- Convert to a date: Paste the timestamp and read local, UTC, ISO and relative renderings.
- Convert back: Pick a date-time to get its epoch value for fixtures and APIs.
- Grab the current time: Use the live panel when you need 'now' in seconds or milliseconds.
The reverse direction converts a picked local date back to epoch seconds. Remember that the picker uses your browser's timezone; the same wall-clock time yields different timestamps for users in different zones.
Common errors and edge cases
- Seconds vs milliseconds. A date near 1970 usually means milliseconds were treated as seconds; a date thousands of years out means the opposite. Match the unit selector to the source.
- Timezone confusion. Epoch values are absolute; only their rendering is zoned. Two people reading the same timestamp in different zones see different wall-clock times — both correct.
- Daylight saving boundaries. Converting a wall-clock time during a DST transition can be ambiguous or non-existent. Prefer storing and comparing epoch values.
- The 2038 problem. 32-bit signed epoch seconds overflow on 2038-01-19. Modern 64-bit systems are unaffected, but embedded and legacy systems still hit it.
- Leap seconds. Unix time ignores leap seconds by convention; a few seconds of drift versus UTC accumulate over decades. Rarely relevant, but do not build precision timing on raw epoch math.
Code equivalents
Epoch conversion is a one-liner everywhere; the trap is always the unit and the timezone rendering, not the math.
| Language | Example |
|---|---|
| JavaScript | new Date(1709000000 * 1000) from seconds; Math.floor(Date.now() / 1000) for current epoch seconds. |
| Python 3 | datetime.fromtimestamp(1709000000, tz=timezone.utc); int(time.time()) for current epoch seconds. |
| Shell | date -d @1709000000 -u prints the UTC date; date +%s prints current epoch seconds. |
Related tools
Frequently asked questions
How do I tell seconds from milliseconds?
Count the digits: current timestamps are 10 digits in seconds and 13 in milliseconds. If a converted date lands in 1970 or the distant future, the unit is wrong.
Is a Unix timestamp timezone-dependent?
No. The number itself is absolute UTC-based. Timezones only change how it is displayed, which is why the tool shows local, UTC and ISO side by side.
What happens in 2038?
Systems storing epoch seconds in a signed 32-bit integer overflow on 19 January 2038. 64-bit systems are safe for about 292 billion years.
Why do I get a different timestamp for the same date?
The date picker uses your browser's timezone. The same wall-clock time corresponds to different epochs for users in different zones — that is expected.
Does Unix time include leap seconds?
No. By convention every day is exactly 86,400 seconds. Leap seconds are smeared or ignored depending on the platform, which can matter for precision timing but not for typical logs.
Privacy note
All processing happens in your browser. The values you enter never leave your device and are never transmitted to ToolPlex.