Unix Timestamp & Milliseconds to Date Converter

Convert between Unix timestamps and date/time online, with 10-digit seconds and 13-digit milliseconds, shown in your local time zone.

Live reference

Current time

01

Timestamp → Date and time

02

Date and time → Timestamp

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 → timestampdatetime-local picker or manual YYYY-MM-DD HH:mm:ss (date-only YYYY-MM-DD also 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-US locale (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.

  1. Open the timestamp converter on Yaya Tools.
  2. Glance at Current time for a live local datetime, seconds, milliseconds, and your device timezone.
  3. 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.
  4. Date → timestamp: pick a moment with the datetime picker, or type YYYY-MM-DD HH:mm:ss (or YYYY-MM-DD alone for midnight local). Read seconds and milliseconds; click Copy on either output.
  5. 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:

  1. Paste or type the numeric value.
  2. Select Seconds (10-digit) when the source is a typical Unix second count (API fields, time() in PHP, %s in shell).
  3. Select Milliseconds (13-digit) when the source is JavaScript Date.now(), Java System.currentTimeMillis(), or database BIGINT millisecond 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

  1. Click Use current time in the live panel.
  2. Read the converted local datetime in the result field.
  3. 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 Date object 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:ss strings—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.

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

Frequently asked questions

What is a Unix timestamp?

A Unix timestamp is the number of seconds (or milliseconds) that have elapsed since 1970-01-01 00:00:00 UTC, excluding leap seconds in typical POSIX and JavaScript usage. It is a portable way to store “when” without storing timezone names.

What is the difference between 10-digit and 13-digit timestamps?

10-digit values usually count seconds since the epoch. 13-digit values count milliseconds (1/1000 of a second). They differ by a factor of 1000. On Yaya Tools, choose the matching radio option before converting.

How do I convert timestamp to date online?

Paste the number into the timestamp converter, select seconds or milliseconds, and read the Conversion result field. The page formats the instant in your device’s local timezone using MM/DD/YYYY-style output.

How do I convert date to Unix timestamp?

Use the Date time → Timestamp section: pick a datetime with the native picker or type YYYY-MM-DD HH:mm:ss. The tool fills both seconds and milliseconds; click Copy on the format your API expects.

Does this tool show UTC or local time?

Local time for your browser/device. The live panel also shows your timezone name from Intl.DateTimeFormat. The underlying instant is the same worldwide; only the displayed clock faces change with zone.

Why is my converted time eight hours off?

Eight hours often indicates comparing UTC source documentation to UTC+8 local display (or vice versa). The timestamp is one moment; timezone display differs. Check the Current device timezone label and align expectations with your log viewer’s zone.

What does **Use current time** do?

It inserts the live 10-digit second Unix timestamp into the timestamp→date input and runs conversion immediately—handy for testing APIs or confirming what “now” looks like as an epoch value.

Can I enter a date without a time?

Yes. Manual format YYYY-MM-DD alone is parsed as local midnight (00:00:00) on that date. Useful for day-boundary timestamps before using the date interval calculator.

Are my timestamps uploaded to a server?

No. All parsing and formatting run locally in your browser. Nothing is sent to Yaya Tools for storage or processing. Clear fields on shared devices when finished.

What epoch does this converter use?

1970-01-01 00:00:00 UTC, the standard Unix/POSIX epoch. Second 0 and millisecond 0 refer to that instant.

How often does the live clock update?

The Current time panel refreshes every second, updating local datetime, 10-digit seconds, and 13-digit milliseconds in sync.

Can I copy seconds and milliseconds separately?

Yes. The date→timestamp panel provides Copy buttons for each output field so you can paste into JSON, SQL, or log queries without selecting text manually.

Does the tool support negative timestamps?

JavaScript Date accepts negative millisecond values (dates before 1970). If the engine parses your input, the tool displays them like any other instant. Very large values may exceed safe integer display limits in other systems.

How does this relate to cron or scheduled jobs?

Cron expressions run on server local time or a configured zone, not “Unix time” directly. After you convert an instant here, validate recurring schedules with the crontab generator. For multi-participant meetings, use the timezone meeting planner instead of guessing offsets.

When should I use the age calculator after converting a timestamp?

When you need years, months, and days between a birth date and a reference date—not just a single decoded moment. Convert the epoch to a calendar date here, then enter that date in the age calculator for full age breakdown and next birthday countdown.