DT
DevToolKit
Clearly labeled tools
Tools
Workspaces
Resources
Browse tools
DT
DevToolKit
Practical PDF, image, developer, and everyday tools

Clearly labeled processing for everyday tasks.

Core processing runs in the browser for most tools. Server-backed and external-provider workflows are labeled separately. Basic tools are available without signup; individual limits vary by tool.

46 unique tools4 workspacesNo signup for basic tools
Browse toolsTrust Center
Tools
All toolsPDF workspaceImage studioDeveloper workbenchGeneral tools
Product
BlogSupportContact
Company
AboutTrust CenterPrivacy PolicyTerms of Use

© 2026 DevToolKit. Practical PDF, image, developer, and everyday tools with clearly labeled processing.

In-browserServer-backedExternal preview
amanhirut32@gmail.com
HomeToolsDeveloperTimestamp Converter

Timestamp Converter

  • In-browser
  • No signup
  • UTC & local time

Convert Unix timestamps, milliseconds and readable dates in your browser.

Core processing runs in your browser and does not upload this file for the task.

Preparing the editor...

The guide and instructions on this page are available while the tool loads.

Continue your workflow

  • Time Zone ConverterConvert a civil time between supported IANA city zones. This page only uses host Date/UTC, not a zone list.
  • JWT DecoderRead iat/exp as Unix seconds (Date(value * 1000)). Use this converter when the raw number may be milliseconds.

What this Timestamp Converter converts

Timestamp Converter maps a numeric Unix instant to display strings, or maps a datetime-local civil time to Unix numbers, using the browser Date API. The page opens in Timestamp to Date with an empty Unix field, unit Auto-detect, and no result. Date to Timestamp starts with getNowLocalDateTimeValue() (local year-month-day and hour:minute). There is no file picker and no Clear button.

The Current time panel is separate: every second it shows Math.floor(Date.now()/1000), Date.now(), formatUtc(now), and toLocaleString(now), with Copy seconds / Copy milliseconds. That clock is not a network time source.

Unix seconds versus milliseconds in this tool

Seconds
Treats the number as seconds: milliseconds = numeric * 1000, then new Date(milliseconds).
Milliseconds
Passes the number to new Date(numeric) as milliseconds.
Auto-detect
detectUnit on integers only; length ≥ 13 or |n| > 9,999,999,999 → milliseconds, else seconds.

Outputs unixSeconds and unixMilliseconds use Math.trunc (seconds = trunc(ms/1000)). A decimal input can therefore show truncated integers. The “JavaScript milliseconds” example forces Milliseconds; other timestamp examples leave Auto-detect. Use current time forces Seconds.

UTC, browser-local time, and formatted output

formatUtc builds YYYY-MM-DD HH:MM:SS UTC from getUTC* getters. formatLocal is date.toLocaleString() with no locale or timeZone options, so the string follows this browser’s locale and host zone. formatIso is date.toISOString() (always a UTC Z string). Relative time uses Intl.RelativeTimeFormat("en", { numeric: "auto" }) with coarse buckets (seconds → years via 60 / 60 / 24 / 30 / 365).

In Date to Timestamp, Local time constructs new Date(year, month - 1, day, hours, minutes) (seconds 0). UTC constructs Date.UTC(...) the same way. The sidebar Timezone label is “UTC storage” in timestamp mode, or “UTC” / “Local” in date mode. Copy on a result row copies that exact display string, not a hidden canonical object.

How the real inputs and controls behave

  1. Current time shows live Unix seconds, Unix milliseconds, UTC time, and Local time from Date.now() every 1000 ms. Copy seconds and Copy milliseconds write those live values via navigator.clipboard.writeText.
  2. Click Timestamp to Date or Date to Timestamp in the Conversion mode group. handleModeChange clears error, copied, and Conversion result; the Unix timestamp and Date and time fields stay.
  3. In Timestamp to Date, paste into Unix timestamp (placeholder 1703123456). Click Auto-detect (default), Seconds, or Milliseconds. Those OptionToggle clicks only set unitMode; click Convert timestamp after changing them.
  4. Click Convert timestamp. It stays disabled while Unix timestamp is blank or whitespace-only. Empty runTimestampConversion throws “Enter a Unix timestamp to convert.”
  5. In Date to Timestamp, set Date and time (input type datetime-local). Click Local time (default) or UTC. Those toggles only set useUtc; click Convert date after changing them.
  6. Click Convert date. parseDateInput splits on T, defaults missing time to 00:00, and reads only hours and minutes (a seconds fragment is ignored). Empty throws “Select a date and time to convert.”
  7. Conversion result lists Unix seconds, Unix milliseconds, UTC time, Local time, ISO 8601, and Relative time, each with Copy (Copied for 1.5 seconds). Empty state copy is “Conversion results will appear here.” There is no download and no Clear.
  8. Click Use current time to switch to Timestamp to Date, fill live Unix seconds, set Seconds, and convert immediately.
  9. Click a Quick examples row: Current time (live seconds, Auto-detect), Unix epoch (“0”, Auto-detect), JavaScript milliseconds (“1703123456789”, Milliseconds), API timestamp (“1703123456”, Auto-detect), or Log timestamp (“2024-12-21T14:30”, Date to Timestamp with Local time). Each converts immediately.

Invalid, ambiguous, fractional, negative, and large timestamp values

  • Empty Unix field: “Enter a Unix timestamp to convert.” Non-numeric: “Enter a valid numeric Unix timestamp.”
  • Auto-detect on a decimal: “Could not detect seconds or milliseconds.”
  • new Date(ms) with NaN getTime: “Timestamp is out of range.”
  • Empty datetime-local: “Select a date and time to convert.” Unparseable parts: “Enter a valid date and time.”
  • Negative integers are allowed by the numeric regex and detectUnit (pre-1970 instants if Date accepts them).
  • JavaScript Date overflow (for example an out-of-range day) can still yield a valid getTime; Valid date Yes is not calendar validation.

Date conversion versus time-zone conversion or event scheduling

This page does not list IANA zones, does not query a time-zone database, and does not schedule events. Showing Local time is a display of the same instant through toLocaleString / the host Date constructor, not a conversion from “America/New_York” to “Europe/London.” DST at the host may affect how a local civil time is constructed, but you cannot select or verify a named zone’s DST rule here.

A converted number does not prove a business date, meeting time, or JWT expiry decision. JWT Decoder treats iat and exp as Unix seconds (new Date(value * 1000) then toLocaleString). If your value is milliseconds, that decoder’s date line will be wrong; convert with an explicit unit here first.

How to review a converted value

  • Confirm Seconds vs Milliseconds vs Auto-detect before trusting the calendar date.
  • If you toggled a unit or Local/UTC after a run, convert again; those toggles do not re-run.
  • Compare UTC time (fixed UTC getters) with Local time (host toLocaleString)—they are different presentations of one Date.
  • ISO 8601 here means toISOString(), not a parser for arbitrary ISO input in Timestamp to Date.
  • Relative time is a snapshot; the live clock is the panel at the top.

Privacy and browser-processing boundaries

TimestampConverter.jsx uses Date, Date.UTC, toISOString, toLocaleString, and Intl.RelativeTimeFormat in the browser. It does not call trackToolEvent and does not POST the timestamp to a conversion API. That is not a confidentiality guarantee: the rest of the page can still load site assets and advertising; the privacy policy describes first-party analytics for event metadata (not designed to store tool contents); clipboard, extensions, and shared devices remain outside this file.

Do not treat the live clock as authoritative legal time. Date.now() is the browser’s clock.

A short timestamp-checklist

  • Pick the unit explicitly when the scale is known; Auto-detect is an integer heuristic.
  • Remember datetime-local has no seconds in this parser.
  • Do not assume toLocaleString matches another computer’s locale or zone.
  • Do not assume Valid date Yes means a real calendar date was validated.
  • There is no download and no Clear; copy the row you need, or switch mode to drop the result panel.

When another DevToolKit tool is more appropriate

  • Time Zone Converter — when you need a named IANA city zone, UTC offsets, or DST-aware city comparison. This page has no zone list.
  • JWT Decoder — when the number is an iat or exp claim on a token. That decoder already formats those claims as Unix seconds; it does not open this converter.

Frequently asked questions

Does conversion run as I type?

No. Convert timestamp and Convert date are explicit. Auto-detect / Seconds / Milliseconds and Local time / UTC only set state; click Convert again after changing them. Use current time and Quick examples call the matching run function immediately.

How does Auto-detect choose seconds or milliseconds?

detectUnit accepts only an integer matching /^-?\d+$/. It returns milliseconds if the digit string length is ≥ 13 or Math.abs(numeric) > 9999999999; otherwise seconds. Decimals fail Auto-detect (“Could not detect seconds or milliseconds.”) unless you pick Seconds or Milliseconds.

Is Local time a time-zone converter?

No. formatLocal is date.toLocaleString() in this browser. Date-to-timestamp Local time uses the host Date constructor; UTC uses Date.UTC. There is no IANA zone picker on this page.

Does relative time keep ticking?

The Current time panel updates every 1000 ms. A stored conversion’s relativeTime is computed once in buildConversionResult from the now at that click. Convert again for a fresh phrase.

Related guides

Longer reads that pair well with this tool.

Developer guide

Useful Developer Tools Every Browser Should Have

Fourteen In-browser developer utilities for JSON, encoding, tokens, diffs, hashes, regex, SQL, UUIDs, and timestamps — fast checks without installing anything.

Related tools

Common next steps after using this tool.

Time Zone Converter

Interpret a chosen date and time in one supported zone and show the equivalent moment in another supported zone, with UTC offsets and multi-city comparison cards.

JWT Decoder

Decode JSON Web Tokens directly in your browser.

Explore more in Developer

Browse related tools or open the full workspace.

Developer workspaceAll tools