Unix Timestamp / Epoch Converter

Convert epoch timestamps to dates and back, with a live ticking clock and timezone support.

Current Unix Timestamp

Timestamp → Date

Seconds or milliseconds — auto-detected.

Date → Timestamp

Code Snippets (current timestamp)

About this tool

What this tool does

Unix time (also called epoch time) counts seconds since midnight, January 1, 1970 UTC — it's how almost every database, log file, and API represents a moment in time under the hood. This converter goes both directions: paste a timestamp and get a readable date, or pick a date and get the timestamp, with automatic detection of whether you pasted seconds or milliseconds so you don't have to remember which one your system uses.

How to use it

  • The current Unix timestamp ticks live at the top — useful for grabbing "right now" as a reference value or a test fixture.
  • Timestamp → Date: paste any epoch value (10-digit seconds or 13-digit milliseconds — both are auto-detected) to see it in your local time, a selected timezone, UTC, ISO 8601, and as a relative time like "3 hours ago."
  • Date → Timestamp: pick a date and time and get back the matching Unix timestamp in both seconds and milliseconds, plus UTC and ISO 8601 versions.
  • Switch the timezone dropdown to see how a timestamp reads in a specific region without doing the offset math yourself.
  • Copy-ready code snippets show how to get the current timestamp in JavaScript, PHP, Python, and MySQL.

Real-world use cases

  • Debugging an API response or log line that shows a raw timestamp like 1765900800 instead of a date.
  • Figuring out whether a database column stores seconds or milliseconds by pasting the value and seeing which interpretation gives a sane date.
  • Converting a scheduled event's local date/time into the UTC timestamp a backend job or cron trigger needs.
  • Quickly grabbing "now" as a Unix timestamp for a test payload or Postman request.

Frequently asked questions

How can I tell if a timestamp is in seconds or milliseconds?

Seconds-based Unix timestamps for dates in the current era have 10 digits; milliseconds-based ones have 13. This tool checks the digit count automatically and parses it correctly either way — you don't need to specify.

Why is Unix time measured from January 1, 1970?

That date, called "the epoch," was chosen somewhat arbitrarily by early Unix developers as a clean, round reference point. It stuck and became the universal standard baked into virtually every programming language and database.

Does a Unix timestamp include timezone information?

No — a Unix timestamp is just a count of seconds since the epoch in UTC, with no timezone attached. The timezone only comes into play when you convert it to a human-readable date, which is why this tool lets you pick which timezone to display it in.

What happens to Unix timestamps after the year 2038?

Systems that store timestamps as signed 32-bit integers will overflow on January 19, 2038 — the so-called "Year 2038 problem." Modern 64-bit systems (which is most of them today) aren't affected and can represent dates far beyond that.