Epoch Converter
Unix epoch time counts seconds (or milliseconds) since 1970-01-01T00:00:00Z, which is why logs, JWTs, and databases often store instants as naked integers. This epoch converter bridges those integers and human calendar strings so you can debug “token expired,” interpret nginx timestamps, or craft a query window without mental arithmetic. Epoch values represent absolute instants; the local clock face you see depends on your browser’s timezone settings. Seconds versus milliseconds is the classic footgun—10-digit and 13-digit numbers mean different scales. Convert carefully, label units in notes, and remember leap-second edge cases are rare but real in specialized systems.
Informational only; verify critical results independently.
How to use
- Paste a Unix timestamp from logs, analytics exports, or API payloads into the epoch field.
- Decide whether the value is seconds (commonly ~10 digits near the present) or milliseconds (commonly ~13 digits).
- Read the resulting UTC and local human-readable forms the tool displays for that instant.
- Alternatively, pick or type a calendar date and time, then convert to epoch seconds or milliseconds for code.
- Copy the integer into JWT exp/nbf claims, SQL filters, or bug reports with an explicit unit label.
- When comparing two events, convert both to the same unit before subtracting durations.
- If a date looks decades off, you almost certainly mixed seconds and milliseconds—scale by 1000 and retry.
- Treat browser-local display as a convenience layer; store and exchange epoch as UTC instants in systems.
- For negative timestamps, confirm your stack supports pre-1970 instants before relying on the result in production.
- Clear confidential timestamp-rich logs from shared machines after you finish debugging.
Examples
- 1700000000 seconds → 2023-11-14T22:13:20.000Z (UTC), useful as a sanity check near late 2023.
- 1700000000000 milliseconds → the same instant as 1700000000 seconds—digit length tells the scale.
- 2025-01-01T00:00:00.000Z → 1735689600 seconds for a New Year boundary in UTC.
- JavaScript Date.now() style 13-digit ms → divide by 1000 (and floor if needed) for APIs that want seconds.
- JWT exp 1735689600 compared with “now” to see whether a token should already be rejected.
- nginx or app log epoch 1699999999 → readable UTC for an incident timeline write-up.
- 0 → 1970-01-01T00:00:00.000Z, the Unix epoch origin itself.
- 1000 ms → one second after the epoch, confirming millisecond math in a unit test fixture.
- A local evening time converted to epoch, then back, to verify round-trip stability for a scheduling bug.
FAQ
- How do I tell seconds from milliseconds?
- As a rule of thumb near the 2020s, values around 1e9–1e10 are seconds and values around 1e12–1e13 are milliseconds. A seconds value mistakenly treated as ms lands in 1970; a ms value treated as seconds lands centuries ahead.
- Is Unix time affected by leap seconds?
- Classic Unix time is a simplified count that does not insert leap seconds the way UTC broadcast time does. For almost all application logging this never matters; specialized astronomy or telecom systems may need explicit leap-second handling elsewhere.
- What timezone is an epoch timestamp in?
- Epoch is timezone-agnostic: it names an instant. Displaying that instant as “3 PM” requires choosing a timezone. The converter may show both UTC and your local zone derived from the browser.
- Can I convert dates before 1970?
- Negative epoch seconds represent earlier instants when the environment supports them. Some older databases and languages struggle with negatives—verify before using pre-epoch values in schemas.
- Why do JSON APIs sometimes send timestamps as strings?
- JavaScript numbers are IEEE-754 doubles and can lose integer precision for extremely large values. Stringified epochs avoid that class of bug. Parse consistently and keep units documented.
- How does this relate to ISO-8601 strings?
- ISO-8601 (for example 2026-07-28T15:00:00Z) is a textual instant or local datetime form. Epoch is a compact numeric form of an instant. Systems often accept one and must convert to the other at boundaries.
- What about day-level epochs used in some databases?
- Some warehouses store days since epoch rather than seconds. Those are different units. Confirm the column definition before converting with a seconds/ms tool.
- My converted time is off by one hour—is that DST?
- Local display follows DST rules for your zone. The underlying epoch instant did not “jump”; the civil clock label did. Compare in UTC when debugging offsets.
- Does the tool send timestamps to a server?
- No. Conversion runs locally in the browser, which is useful when log excerpts contain sensitive operational detail.
- How do milliseconds map to JavaScript Date?
- JavaScript Date uses milliseconds since the Unix epoch. new Date(1700000000000) corresponds to the ms form of 1700000000 seconds. Mixing Date.now() with second-based APIs is a frequent integration bug.
Formula / Method
Assumptions & Limitations
Related guides
Related tools
Last updated: 2026-07-28