Stockio
Creator & Productivity Runs in your browser

Unix Timestamp Converter

Convert Unix timestamps to readable dates and back, in local time and UTC.

Loading tool…

Unix timestamps represent an instant as elapsed time relative to the Unix epoch: midnight UTC on 1 January 1970. Many APIs use seconds, while JavaScript commonly uses milliseconds. Confusing those units can move a date by decades. This converter makes the distinction visible and provides ISO, UTC, local, and relative views of the same instant, plus examples for common programming environments.

How to use it

  1. Paste a numeric value into Unix timestamp, or keep the fixed sample for 1 January 2026.
  2. Read the ISO 8601 and UTC results to confirm the absolute instant.
  3. Compare the local display with your browser timezone.
  4. Use the local date and time field to calculate Unix seconds from a wall-clock value.
  5. Copy or adapt the JavaScript, Python, PHP, and PostgreSQL examples for your integration.

Understanding the output

The live clock shows current seconds and milliseconds after the page mounts. Its initial placeholder avoids displaying a server-rendered time as though it were your browser's current clock. Like any client clock, it can be wrong if the device time is incorrect. It is a convenience for debugging rather than an authoritative time service.

The input automatically treats values with an absolute magnitude below 100 billion as seconds and larger values as milliseconds. This is a useful modern-date heuristic, not an unambiguous encoding rule. Very early millisecond timestamps can resemble seconds, and far-future second timestamps can resemble milliseconds. Confirm the units from your API documentation when handling historical archives or unusual ranges.

UTC and local time are different views

ISO output includes the UTC marker Z. The UTC string describes the same instant in a human-readable format. Local output uses browser locale and timezone settings, which means teammates can see different wall-clock times for the same timestamp. The relative label compares the instant with the current browser clock and rounds down to a whole number of seconds, minutes, hours, or days.

Pro tips

  • Include explicit units in field names, such as created_at_seconds or expires_at_ms.
  • Exchange UTC instants between services and localize only at the presentation boundary.
  • Keep timezone information when a business rule depends on a location's calendar.
  • Test values around midnight and daylight-saving transitions before releasing scheduling features.

The date and time input intentionally describes local wall-clock time. It does not include a timezone selector. JavaScript interprets that input according to your browser environment, so the same entry on two machines can produce different Unix values. For a portable comparison, use an explicitly offset date string in application code or inspect the UTC output after conversion.

Common mistakes and debugging cases

Multiplying milliseconds by 1000 a second time is as problematic as forgetting to multiply seconds. JavaScript Date expects milliseconds; Python fromtimestamp and PostgreSQL to_timestamp expect seconds in the shown examples. PHP gmdate displays UTC rather than relying on a server's configured local timezone.

Use the tool to inspect API expiration fields, investigate log ordering, or confirm deployment metadata. It cannot infer the intended timezone of an unlabeled date in a screenshot, nor can a relative label replace a precise timestamp in an audit record. Preserve the original value and its documented units when sharing a bug report.

Further reading and practical checks

Read Unix timestamp and date conversion: practical background for a broader workflow, and use the related json formatter tool when the next task requires it. The official reference provides additional technical context. Keep those references alongside your own acceptance criteria so a convenient result does not become an undocumented assumption.

Before handing off work, compare one known example against a manually verified expectation. Save the original input, identify the settings that matter, and explain any approximation to the next person. Small checks catch unit mistakes, formatting differences, and misplaced confidence early. When requirements change, repeat the same example before applying the workflow to a larger collection.

Keep context with the result

A copied result is easier to reuse when its source and purpose are clear. Include a short note describing where the input came from, which part of the output matters, and what you expect a teammate to verify. Avoid sharing sensitive source material unnecessarily. When a result seems surprising, reduce the example to the smallest input that reproduces it, then compare that case against the documented rules. This turns an ambiguous discrepancy into a concrete question that is much easier to investigate.

Frequently asked questions

Why does my date show 1970?+

A common cause is passing seconds to a function expecting milliseconds. Confirm the input units before changing the date itself.

How does automatic detection work?+

Values below 100 billion in absolute magnitude are treated as seconds. This heuristic can be ambiguous for very early millisecond values or extreme future dates.

Is the date input UTC?+

No, the date and time field uses your browser local timezone. The ISO result is the UTC representation of the interpreted instant.

Why do teammates see different local times?+

They may use different timezones or locale settings. Compare ISO output to verify that you are discussing the same instant.

Is the live clock authoritative?+

It reflects the device clock and updates each second. Use a trusted time service when clock accuracy is a security or financial requirement.

Articles that use this tool

In-depth articles with the Unix timestamp built right in.

Dev Tools & AI Coding

Git Workflow for Solo Developers: Simple Best Practices

Build a lightweight solo Git workflow with focused commits, short branches, release tags, and reliable recovery steps that protect your publishing work.

Includes: Unix timestampSofia MarchettiSofia Marchetti
VPN & Online Privacy

VPN Keeps Disconnecting on Mobile? Fix Keepalive Settings

Diagnose mobile VPN disconnects with timestamped tests, tune WireGuard and OpenVPN keepalives, and separate NAT timeouts from sleep and roaming issues.

Includes: Unix timestampRavi DesaiRavi Desai
Web Hosting & Servers

Certbot Wildcard SSL With Let's Encrypt, Automated

Issue wildcard certificates with DNS-01, protect scoped DNS credentials, automate Certbot renewals, and verify certificate expiry on your live server.

Includes: Unix timestampRavi DesaiRavi Desai
Web Hosting & Servers

Uptime Kuma: Open-Source Server Monitoring Setup

Deploy Uptime Kuma safely, add meaningful HTTP checks, and correlate alert timestamps with Linux CPU, memory, and disk metrics to diagnose real outages.

Includes: Unix timestampRavi DesaiRavi Desai
JavaScript & Frameworks

JavaScript Dates: Intl.DateTimeFormat and Temporal API

Choose the right JavaScript representation for timestamps, calendar dates, and zoned appointments. Format with Intl and avoid parsing, daylight-saving, and unit mistakes.

Includes: Unix timestampSofia MarchettiSofia Marchetti
Backend & APIs

Session Cookies vs JWT: Choosing API Authentication

Compare server-side sessions and JWT access tokens for web APIs, including revocation, cookie security, token validation, and practical browser deployment trade-offs.

Includes: Unix timestampChidi NwosuChidi Nwosu