Skip to content
LocalOnly

Unix Timestamp Converter

Stable

Convert between Unix timestamps and human-readable dates, both ways.

Everything is processed locally in your browser

About Unix Timestamp Converter

Convert Unix timestamps into readable dates and any date back into a timestamp. The tool auto-detects seconds versus milliseconds, shows both UTC and your local time, and renders the ISO 8601 string alongside a relative 'time ago' value. A live clock makes it easy to grab the current timestamp on demand.

Features

  • Convert timestamp to date and date to timestamp in one place
  • Auto-detects seconds vs. milliseconds and lets you override the unit
  • Shows UTC, local time, ISO 8601, and a relative 'time ago' value
  • Live current Unix time with a one-click 'use now' button
  • Handles negative timestamps for dates before 1970
  • Copy any representation instantly

How to use Unix Timestamp Converter

  1. 1

    Enter a timestamp or a date

    Paste a Unix timestamp to convert it to a date, or pick a date and time to get its timestamp. The tool detects whether your number is in seconds or milliseconds.

  2. 2

    Review the conversions

    See the value in UTC and local time, as an ISO 8601 string, and as a human-friendly relative time.

  3. 3

    Copy what you need

    Copy the timestamp, the ISO string, or a formatted date to use in code, logs, or a database query.

Examples

Timestamp to UTC date

A 10-digit seconds timestamp converted to a readable UTC date.

Input

1700000000

Output

Tue, 14 Nov 2023 22:13:20 UTC (2023-11-14T22:13:20Z)

How Unix timestamps work

Seconds or milliseconds is the first thing to establish

A Unix timestamp counts elapsed time since 1970-01-01T00:00:00Z, but the unit is not part of the value, and that ambiguity causes more bugs than anything else in date handling. Unix tooling, JWT claims, database `TIMESTAMP` columns and most APIs use seconds. JavaScript's `Date.now()`, Java's `System.currentTimeMillis()` and many logging systems use milliseconds.

Digit count is a reliable check for the current era. A 10-digit value is seconds and lands in the present. A 13-digit value is milliseconds. If a date comes out in 1970, you passed milliseconds to something expecting seconds - divide by 1000. If it comes out around the year 55,000, you did the reverse.

Microseconds (16 digits) appear in Postgres internals and some tracing systems, and nanoseconds (19 digits) in Go's `time.UnixNano()` and Prometheus. Both are worth recognising, because a nanosecond timestamp exceeds JavaScript's safe integer range and will lose precision if parsed as a plain number.

Timestamps have no timezone, and that is the point

A Unix timestamp is an absolute instant. It carries no timezone because it does not need one - the same value refers to the same moment everywhere on earth. Timezones enter only when you format that instant for a person to read, and that is a presentation concern rather than a storage one.

This is why the standard advice is to store timestamps in UTC and convert only at the display layer. Storing local times means every read has to know which zone was intended, and any daylight-saving transition makes some local times ambiguous or nonexistent. The hour that repeats when clocks go back genuinely maps two different instants to one local time.

The `Z` suffix in ISO 8601 means UTC specifically, and an offset like `+02:00` means a fixed displacement from it. Neither identifies a timezone: `+02:00` could be Central European Summer Time or South Africa Standard Time, and only one of them observes daylight saving. When you need to store a future local time - a recurring calendar appointment - you need the IANA zone name like `Europe/Oslo`, because the offset itself may change before the event arrives.

The 2038 problem, and other boundaries

A signed 32-bit integer holding seconds overflows on 19 January 2038 at 03:14:07 UTC, wrapping to December 1901. This is a real deadline for embedded systems, older C code and any database column defined as a 32-bit int. Modern systems use 64-bit values and are safe for roughly 292 billion years, but legacy code with `time_t` as a 32-bit type still exists in deployed hardware.

Two other boundaries are worth knowing. JavaScript's `Date` is limited to ±8,640,000,000,000,000 milliseconds from the epoch - about ±273,000 years - and anything beyond becomes an Invalid Date. And integers above 2^53 lose precision as IEEE-754 doubles, which is exactly why nanosecond timestamps must be handled as strings or BigInt in JavaScript rather than as numbers.

Negative timestamps represent dates before 1970 and are valid, though support is inconsistent. Some systems reject them, some treat them as unsigned and produce dates in 2106, and some handle them correctly. If you work with historical dates, test this rather than assuming.

Why Unix time quietly ignores leap seconds

Unix time is defined as counting seconds since the epoch excluding leap seconds, which means it does not track true elapsed physical time. When a leap second is inserted, the Unix clock either repeats a value or is stepped, depending on the platform's approach.

The practical implication is that a Unix timestamp is not a reliable measure of duration across a leap second, and that timestamps are not strictly monotonic - the same value can occur twice. Google and others avoid the discontinuity with leap smearing, spreading the adjustment across a day so no clock ever jumps.

For almost all application code this does not matter. It matters if you are measuring durations with sub-second precision across a leap second boundary, or if you rely on timestamps being unique and strictly increasing. In the second case use a monotonic clock for durations, and a proper sequence or UUID v7 for ordering.

Reference

Identifying a timestamp by its length

DigitsUnitExample valueFound in
10Seconds1735689600Unix tools, JWT exp/iat, most APIs
13Milliseconds1735689600000JavaScript, Java, many log formats
16Microseconds1735689600000000PostgreSQL internals, tracing systems
19Nanoseconds1735689600000000000Go UnixNano, Prometheus
NegativeBefore 1970-86400Historical dates; support varies

Which tool should you use?

These tasks overlap. Here is how to pick the right one for what you are actually doing.

You are reading a timestamp from a log or a database row
Count the digits first to establish the unit, then convert.
You are checking a JWT expiry
JWT `exp` and `iat` are always in seconds. A 13-digit value there is a bug in the issuer.
You need to decode a whole token rather than one claim
The JWT Decoder handles all three segments and shows every claim.
You need an identifier that sorts by time
A UUID version 7 embeds a millisecond timestamp and is designed for exactly that.

Use cases

  • Reading epoch timestamps found in logs, JSON, and databases
  • Interpreting JWT exp, iat, and nbf claims as real dates
  • Building date filters for queries and API requests
  • Debugging time zone bugs by comparing UTC and local output
  • Grabbing the current Unix time for seeding or testing

Troubleshooting common errors

The date comes out as January 1970

Why: A millisecond value was interpreted as seconds, so it resolves to a few days after the epoch.

Fix: Divide by 1000, or set the unit to milliseconds. A 13-digit input is the giveaway.

The date is tens of thousands of years in the future

Why: A seconds value was interpreted as milliseconds.

Fix: Multiply by 1000 or switch the unit. This is the most common cause of a JWT that never expires.

The converted time is off by a whole number of hours

Why: A timezone conversion, not an error - the timestamp is UTC and is being displayed in local time.

Fix: Compare against the UTC rendering. A one-hour discrepancy near a transition date is usually daylight saving.

A nanosecond timestamp loses its final digits

Why: It exceeds 2^53 and cannot be held exactly as a JavaScript number.

Fix: Handle it as a string or a BigInt, and only convert to a number after reducing it to milliseconds.

A pre-1970 date fails to convert

Why: Negative timestamp support is inconsistent - some systems read the value as unsigned.

Fix: Use an ISO 8601 date string for historical dates rather than a Unix timestamp.

Limitations

What this tool deliberately does not do, so you know when to reach for something else.

  • A timestamp does not record its own unit, so seconds and milliseconds must be distinguished by digit count.
  • Unix time excludes leap seconds and is therefore not a measure of true elapsed time.
  • A fixed UTC offset does not identify a timezone; future local times need an IANA zone name.
  • Values above 2^53 lose precision when handled as JavaScript numbers.
  • Negative timestamps for pre-1970 dates are handled inconsistently across systems.

Frequently asked questions

Learn more

Command Palette

Search for a tool or command