A free Unix timestamp converter turns epoch seconds or milliseconds into readable local date and time—and the other way around. On Yaya Tools you see a live clock with the current timestamp, paste a 10-digit or 13-digit value to decode it, or pick a date to generate both second and millisecond outputs with one-click copy. Everything runs locally in your browser; nothing is uploaded to a server.
People search for a timestamp converter, timestamp to date tool, or epoch converter when API responses, server logs, database columns, or JWT claims return opaque numbers instead of calendar dates. A single Unix timestamp always refers to one instant worldwide, but developers still need to see that instant in their own timezone. This page answers that need without installing software, signing in, or pasting sensitive log lines into a remote service.
What is a Unix timestamp converter?
A Unix timestamp converter (also called an epoch converter or timestamp to date tool) translates between:
- Unix time — an integer count of seconds or milliseconds since the Unix epoch: 1970-01-01 00:00:00 UTC, as defined by POSIX and widely used on Linux, macOS, and in JavaScript
- Human-readable datetime — year, month, day, hour, minute, and second in a locale-aware display
Yaya Tools’ timestamp converter is built for everyday debugging and documentation:
- Live reference panel — current local datetime updates every second, alongside 10-digit seconds and 13-digit milliseconds
- Use current time — fills the timestamp→date field with the live 10-digit second value
- Timestamp → date — accept 10-digit seconds or 13-digit milliseconds via a radio toggle
- Date → timestamp —
datetime-localpicker or manualYYYY-MM-DD HH:mm:ss(date-onlyYYYY-MM-DDalso works) - Dual output — both seconds and milliseconds with dedicated Copy buttons
- Device timezone label — shown via
Intl.DateTimeFormat().resolvedOptions().timeZone - Local display — results formatted with
en-USlocale (MM/DD/YYYY style clock time) - Local processing — parsing and math stay in your current browser session
It does not batch-convert files, parse ISO-8601 strings with explicit Z offsets in a separate field, or schedule cron jobs. For calendar span math after you have a date, use the date interval calculator. For multi-city meeting overlap, use the timezone meeting planner.
How to use this timestamp converter
The workflow is short so you can decode a log line or encode a deadline in under a minute.
- Open the timestamp converter on Yaya Tools.
- Glance at Current time for a live local datetime, seconds, milliseconds, and your device timezone.
- Timestamp → date: paste a value into the timestamp field, choose Seconds (10-digit) or Milliseconds (13-digit), and read the converted result. Click Use current time to populate the field with the live second value.
- Date → timestamp: pick a moment with the datetime picker, or type
YYYY-MM-DD HH:mm:ss(orYYYY-MM-DDalone for midnight local). Read seconds and milliseconds; click Copy on either output. - Click Clear all when you start a new conversion.
Invalid numbers or unparseable dates show an inline status message. Successful conversions also flash a brief success notice. The manual date field syncs to the datetime picker when parsing succeeds.
Privacy note: timestamps and dates you enter are processed only in the browser. Yaya Tools does not receive or store them. On a shared machine, click Clear all when you finish if log excerpts contain sensitive identifiers.
Unix epoch and how timestamps work
Unix time counts from a fixed origin called the epoch:
Epoch = 1970-01-01 00:00:00 UTC
POSIX systems (IEEE Std 1003.1) treat this instant as second 0. Positive values move forward in time; negative values (supported by JavaScript’s Date) represent moments before 1970.
Seconds vs milliseconds
| Format | Typical length | Meaning |
|---|---|---|
| Seconds | 10 digits (e.g. 1640995200) | Whole seconds since epoch |
| Milliseconds | 13 digits (e.g. 1640995200000) | Thousandths of a second since epoch |
Relationship:
Milliseconds = Seconds × 1000
Seconds = floor(Milliseconds ÷ 1000)
JavaScript’s Date.now() returns milliseconds. Many backend APIs and Linux date +%s commands return seconds. Mixing the two without scaling is the most common conversion error—this tool’s radio toggle exists to prevent that.
What the epoch example means
Timestamp 1640995200 (seconds) equals 2022-01-01 00:00:00 UTC. The same instant displays differently in local time:
- UTC: 01/01/2022, 12:00:00 AM
- America/New_York (EST, UTC−5): 12/31/2021, 07:00:00 PM
- Asia/Shanghai (UTC+8): 01/01/2022, 08:00:00 AM
The number is universal; the clock face depends on timezone. Yaya Tools always shows the device local timezone for converted results, labeled at the top of the page.
Timestamp to date: seconds and milliseconds
In the Timestamp → Date time panel:
- Paste or type the numeric value.
- Select Seconds (10-digit) when the source is a typical Unix second count (API fields,
time()in PHP,%sin shell). - Select Milliseconds (13-digit) when the source is JavaScript
Date.now(), JavaSystem.currentTimeMillis(), or databaseBIGINTmillisecond columns.
The implementation multiplies seconds by 1000 before constructing a JavaScript Date, then formats with:
toLocaleString('en-US', { year, month: '2-digit', day: '2-digit',
hour: '2-digit', minute: '2-digit', second: '2-digit' })
That yields familiar MM/DD/YYYY ordering with 12-hour or 24-hour clock depending on browser locale settings, while keeping month/day order consistent with en-US.
Use current time writes Math.floor(Date.now() / 1000) into the input—always a 10-digit second value—so you can immediately verify the round trip without looking up “now” elsewhere.
Date to timestamp: picker and manual input
The Date time → Timestamp panel offers two input paths that stay in sync:
Datetime-local picker
The native datetime-local control captures year, month, day, hour, and minute in local time. The tool converts that instant to:
Seconds = floor(date.getTime() / 1000)
Milliseconds = date.getTime()
Manual text input
Accepted patterns include:
YYYY-MM-DD HH:mm:ss— full local datetime (example:2024-06-15 14:30:00)YYYY-MM-DD— treated as local midnight on that calendar date (00:00:00)
After a successful manual parse, the datetime picker updates to match, so you can fine-tune minutes visually.
Both output fields are read-only; use Copy beside seconds or milliseconds to paste into code, tickets, or SQL.
Worked examples
These values can be typed directly into the tool to verify behavior.
Example 1: Known epoch second
Input: 1640995200, type Seconds (10-digit).
UTC instant: 2022-01-01 00:00:00
Local display: depends on your device timezone (see label on page)
If your machine is set to UTC+8, expect something like 01/01/2022, 08:00:00 AM local.
Example 2: Same instant in milliseconds
Input: 1640995200000, type Milliseconds (13-digit).
Same instant as Example 1
Seconds output when converting back: 1640995200
Always pick the radio option that matches digit count—pasting a 13-digit value while Seconds is selected multiplies incorrectly and jumps far into the future.
Example 3: Date-only manual entry
Manual input: 2024-01-01.
Interpreted as 2024-01-01 00:00:00 local
Seconds ≈ value shown in tool (varies by timezone offset from UTC)
Milliseconds = seconds × 1000
Date-only input is useful for “start of business day” boundaries before you measure spans in the date interval calculator.
Example 4: Round trip with Use current time
- Click Use current time in the live panel.
- Read the converted local datetime in the result field.
- Copy that moment into the date→timestamp side via the picker.
Seconds and milliseconds should match the live panel within the same second (sub-second drift is normal while the clock ticks).
Example 5: Pre-1970 (negative Unix time)
JavaScript accepts negative millisecond values. Example second -86400 is one day before the epoch. The tool formats any Date the engine accepts; extremely large magnitudes may hit environment limits.
Time zones and local display
A timestamp does not embed a timezone. It stores offset from epoch only. Display therefore requires a timezone rule set:
- Yaya Tools uses the browser’s local timezone via the JavaScript
Dateobject and shows the IANA name when available (America/Los_Angeles,Europe/London,Asia/Tokyo, etc.). - Converted datetimes use local interpretation for manual
YYYY-MM-DD HH:mm:ssstrings—consistent with how developers usually mean “wall clock here.”
If your log viewer shows UTC but this tool shows local, both can be correct. Compare against UTC by temporarily setting the OS timezone or by noting the offset on the page label.
For scheduling across cities—not just decoding one instant—open the timezone meeting planner. For age or birthday math from a birth date, use the age calculator after you normalize dates here.
Common mistakes when converting timestamps
Treating 10-digit and 13-digit values the same. Always match the radio toggle to the source format. Thirteen digits with Seconds selected inflates the date by 1000×.
Assuming the displayed time is UTC. Results are local unless your device timezone is UTC. A “missing eight hours” report often means comparing UTC logs to UTC+8 display.
Forgetting leap seconds in mental math. Unix time used in JavaScript ignores leap seconds; POSIX time_t behavior matches the web platform. Do not hand-add leap-second tables for API debugging.
Using date strings without timezone when the API meant UTC. If documentation says “UTC midnight,” typing 2024-01-01 here means local midnight, which differs from UTC midnight in most zones. Align with your API contract.
Rounding milliseconds to seconds too early. 1640995200123 ms is not exactly 1640995200 s. Copy the millisecond field when sub-second precision matters.
Ignoring DST when scheduling recurring jobs. A local 14:00 on a cron line may shift when daylight saving changes. After converting a one-off datetime, validate recurring rules in the crontab generator with the intended zone context.
Related tools on Yaya Tools
| Task | Tool |
|---|---|
| Days between two calendar dates | Date interval calculator |
| Overlapping work hours across cities | Timezone meeting planner |
| Age in years, months, days from birth date | Age calculator |
| Cron schedule from plain language or fields | Crontab generator |
Typical flow: decode a log timestamp here → copy the calendar date → measure distance to today in the date interval tool, or set a cron boundary from the decoded local time.
References
- POSIX Base Definitions — seconds since the Epoch — Normative definition of Unix epoch time in IEEE Std 1003.1.
- Date - JavaScript | MDN — How ECMAScript
Datestores milliseconds since 1970-01-01 UTC and parses local vs UTC inputs. - Intl.DateTimeFormat | MDN — Locale and timezone resolution used for display and the device timezone label.