Unix Time Converter for Epoch Seconds and Milliseconds
Epoch converterUnix time represents an instant as an offset from 00:00:00 UTC on 1 January 1970, and the most common mistake is confusing seconds with milliseconds — the values differ by a factor of 1,000. The Unix Time Converter supports both units through an explicit selector. It turns an integer timestamp into a GMT date, browser-local date, and approximate relative time, and in the other direction it reads a datetime-local value and returns epoch seconds and milliseconds. A live clock shows the current epoch in whole seconds.
Quick answer. Enter an integer and select Seconds or Millis. The tool immediately shows its UTC/GMT representation, your browser's local representation, and an approximate "ago" or "in" value. To convert the other way, choose a date and time in the calendar field; it is interpreted in the browser's local time zone and converted to seconds and milliseconds. Ten-digit current-era values are often seconds and 13-digit values are often milliseconds, but this tool does not auto-detect — select the correct unit explicitly.
What is Unix time?
Unix time counts elapsed seconds from the Unix epoch, 1970-01-01 00:00:00 UTC:
| Instant | Epoch seconds | Epoch milliseconds |
|---|---|---|
| Unix epoch | 0 | 0 |
| One second after epoch | 1 | 1000 |
| One second before epoch | -1 | -1000 |
An epoch timestamp identifies an instant. It does not contain a time-zone name, locale, calendar display format, or daylight-saving abbreviation — those are applied when software renders the instant.
Converting a timestamp to a date
Enter the timestamp, select Seconds or Millis, then read GMT Date, compare Local Date when local context matters, and treat Relative Time as an approximate convenience value. Internally the tool multiplies seconds by 1,000 because JavaScript Date accepts milliseconds; the GMT output uses toUTCString() and the local output uses Date.toString(). For example, epoch 0 represents the same instant everywhere:
GMT: Thu, 01 Jan 1970 00:00:00 GMT
Choose Millis when the value already counts thousandths of a second; the tool passes the integer directly to the date constructor. Using the wrong unit produces a dramatically different result: if 1784370916000 milliseconds is treated as seconds, multiplying by 1,000 pushes it far outside its intended date and may create an invalid date, while 1784370916 seconds treated as milliseconds lands only a few weeks after January 1970. Digit length is only a clue — negative values, historical timestamps, far-future dates, and leading zeros make length heuristics unreliable, so use the source API's schema.
Converting a calendar date to Unix time
Choose a date and time in Pick Date & Time. The browser interprets that wall-clock value in its local time zone, and you read Epoch (Seconds) or Epoch (Milliseconds). Epoch milliseconds are the JavaScript time value; epoch seconds are calculated with Math.floor(milliseconds / 1000), so sub-second precision is not shown in the seconds output.
The input control has no time-zone selector or offset. If a specification says "09:00 UTC" but your browser is set to Asia/Kolkata, entering 09:00 means 09:00 Asia/Kolkata — not UTC. Verify the intended time zone separately.
Important initial calendar-value caveat
When the tool opens, its default calendar field is populated from new Date().toISOString().slice(0, 16). toISOString() contains UTC clock fields, but a datetime-local control has no zone and is later parsed as local time. In a non-UTC browser time zone, the initial visible calendar value can therefore represent a shifted instant when converted — UTC clock digits can be interpreted as if they were local clock digits.
Before relying on calendar-to-epoch output, actively select or edit the intended local date and time. For UTC conversion, calculate the correct local equivalent or use a tool with an explicit UTC/time-zone selector. This caveat affects the initial default, not the underlying definition of Unix time.
GMT, UTC, and local time
The UI labels the universal result GMT Date. For ordinary software timestamps, GMT and UTC are often used interchangeably as the zero-offset display, although they are not identical concepts in precision timekeeping. The local output depends on the device's time-zone configuration, the historical and current time-zone rules known to the browser, daylight-saving transitions, and locale/runtime date-string formatting.
Two users can see different local strings for the same timestamp while the instant remains identical, so use epoch values or an ISO 8601 string with Z or an explicit offset when exchanging instants between systems. Note that this tool does not output ISO 8601 directly — its universal display is a UTC/GMT date string, not 2026-08-20T12:00:00.000Z format.
Seconds vs. milliseconds
| Unit | Relationship | Current-era length | Common systems |
|---|---|---|---|
| Seconds | Whole seconds from epoch | Around 10 digits | Unix tools, JWT claims, many APIs |
| Milliseconds | Seconds × 1,000 | Around 13 digits | JavaScript, browser timestamps |
Do not append or remove three zeros without confirming whether sub-second information exists. Converting milliseconds to whole seconds discards the remainder, and the tool's numeric input is parsed as an integer, so any decimal portion is truncated before conversion.
The live clock and relative time
The Current Epoch Clock updates once per second with Math.floor(Date.now() / 1000), showing whole seconds according to the device clock. It is useful for quick comparisons but is not a precision time source: device clocks can be wrong or drift, and browser scheduling can be delayed. Use a synchronized server or trusted time service for systems that require authoritative time.
The relative result compares the selected timestamp with Date.now() when the conversion runs, rounding into seconds, minutes, hours, or days:
12 minutes ago
in 3 days
This is an approximation: values are rounded, "day" is treated as 24 hours, calendar month and year differences are not calculated, and the value does not refresh every second automatically. Change the input or unit to recalculate, and use absolute timestamps for auditing, billing, legal deadlines, and scheduling logic.
Time zones, DST, and pre-1970 dates
Unix timestamps do not change when a user changes time zones; only the displayed local representation changes. That makes epoch values useful for storing instants such as an API request time, account creation, token expiration, or a job execution instant. Not every date/time is best modeled as an instant, though: "Every day at 09:00 Europe/London" is a recurring civil-time rule affected by daylight saving, and storing only one UTC offset does not capture the recurrence — save the relevant IANA time-zone identifier and scheduling intent.
A local wall-clock time can be ambiguous or nonexistent during daylight-saving transitions: when clocks move forward some times never occur, and when they move back the same local time can occur twice. The datetime-local field contains no zone, JavaScript applies browser rules when parsing it, and the UI does not let you choose the earlier or later occurrence. Negative Unix values represent instants before the epoch — entering -1 second produces the instant one second before 1970 UTC — but historical local-time output should be treated carefully, and downstream systems may reject negative timestamps even when JavaScript accepts them.
Precision, leap seconds, and Year 2038
JavaScript numbers cannot represent every integer above Number.MAX_SAFE_INTEGER exactly, so very large millisecond values can lose integer precision before reaching the date constructor, and Date supports only a finite range beyond which values become invalid. The numeric input is processed with parseInt, so decimals are discarded, very large values can lose precision, and invalid or empty input clears the outputs. Validate ranges and types according to the destination system rather than assuming every integer is a supported timestamp.
Typical Unix time APIs do not represent leap seconds as a unique 23:59:60 timestamp; JavaScript Date follows ECMAScript time behavior rather than exposing leap seconds. Separately, the Year 2038 issue affects systems that store epoch seconds in a signed 32-bit integer, which overflows in January 2038. Modern JavaScript numbers are not limited to signed 32-bit seconds, so this converter can represent dates beyond that point — but the receiving database, embedded device, C library, or legacy API may still have a 32-bit limit. Conversion success does not prove downstream compatibility.
Common conversion problems
The date is near 1970
A seconds value was probably interpreted as milliseconds. Select Seconds.
The date is invalid or extremely far away
A millisecond value may have been treated as seconds, or the value exceeds JavaScript Date range.
Calendar conversion is offset by several hours
The date-time input is interpreted as local time. Also account for the initial UTC-to-local field caveat described above.
Two users see different Local Date values
Their browsers use different configured time zones. Compare the GMT result or epoch value.
A decimal timestamp loses precision
Input is parsed as an integer. Use milliseconds for sub-second precision and provide a whole-number millisecond value.
Relative time is stale
It recalculates on timestamp or unit changes, not continuously. The separate current epoch clock updates every second.
Privacy and browser-based processing
All conversions use the browser's built-in number and date functions. No date value needs to be submitted to a conversion API. Date inputs can still reveal schedules or operational information if shared through screenshots, clipboard history, or logs, so follow normal privacy practices.
Accuracy depends on the device clock and time-zone settings. Client-side processing does not make the device an authoritative clock.
Frequently asked questions
Does the tool auto-detect seconds and milliseconds?
No. Choose Seconds or Millis explicitly.
What does the live clock show?
It displays the browser device's current Unix time in whole seconds and updates once per second.
Is Unix time always UTC?
It represents an instant relative to the UTC epoch. Time-zone rules are applied only when displaying that instant as local calendar time.
How is calendar input interpreted?
The datetime-local value has no offset and is parsed in the browser's local time zone.
Why can the initial calendar value be shifted?
It is populated with UTC clock fields but later interpreted as local clock fields. Select or edit the intended value before use.
Does the tool output ISO 8601?
No. It displays a UTC/GMT string and a browser-local string, plus epoch values.
Are decimal seconds supported?
The timestamp input is parsed as an integer, so decimals are truncated. Use whole milliseconds for sub-second precision.
Does relative time update continuously?
No. It recalculates when the timestamp or unit changes.
Can it convert dates before 1970?
Negative timestamps can represent pre-1970 instants when the browser and downstream system support the range.
Is the tool affected by Year 2038?
The browser is not limited to signed 32-bit epoch seconds, but downstream systems may still be.
Related tools
JWT Decoder
Inspect exp, iat, and nbf claims before converting their epoch seconds.
JSON Formatter
Find timestamp fields in API payloads.
UUID Generator
Generate identifiers; timestamps and UUIDs solve different problems.
Related guides
QR Code Generator Guide
Generate high-quality custom QR Codes for any URL, text, or phone number instantly.
Word & Character Counter Guide
Live-updates word, character, and paragraph counts plus a reading-time estimate.
JSON Formatter / Validator Guide
Format, validate, beautify, and minify raw JSON string data dynamically.
Convert epoch time
Enter a timestamp and pick Seconds or Millis, or choose a calendar date to read epoch seconds and milliseconds.
Use Unix Time Converter