Skip to content

Unix Timestamp Converter

Paste an epoch value in seconds, milliseconds, microseconds or nanoseconds and get the ISO 8601, UTC and local representations. Convert in the other direction too, from a date string back to epoch.

  • Automatic unit detection
  • Seconds, milliseconds, micro and nano
  • ISO 8601, UTC and local output
  • Relative time ("3 hours ago")
  • Date string back to epoch

Converter

Converted locally, nothing uploaded

ISO 8601 is safest: 2026-08-14T15:30:00Z

How to convert a Unix timestamp

  1. 01

    Paste the timestamp

    Enter the epoch number. The unit is detected from its magnitude, so a 10-digit value is read as seconds and a 13-digit one as milliseconds.

  2. 02

    Override the unit if needed

    Detection is a heuristic. If you know the unit, select it explicitly so a small value is not misread.

  3. 03

    Read all representations

    You get ISO 8601 for machines, UTC for servers, your local time for humans, and a relative description to sanity-check the order of magnitude.

  4. 04

    Convert back if needed

    Use the date field to go the other way and turn a readable date into seconds and milliseconds since epoch.

What epoch time actually counts

A Unix timestamp is the number of seconds elapsed since 1 January 1970 00:00:00 UTC, the Unix epoch. It has no timezone, no locale and no ambiguity: the same instant produces the same number everywhere on Earth, which is precisely why it is the format of choice for logs, databases and APIs.

It also, strictly speaking, ignores leap seconds. A Unix timestamp counts days as exactly 86,400 seconds, so during a leap second the clock repeats a value rather than incrementing. For anything short of scientific timekeeping this is irrelevant — but it is why Unix time is not the same as elapsed physical time.

Seconds or milliseconds: the most common bug

Unix and most backend languages use seconds. JavaScript's Date.now() uses milliseconds. Mixing the two is the single most frequent timestamp bug in web development, and the symptom is unmistakable: dates in January 1970, or dates roughly fifty thousand years in the future.

JWT claims (exp, iat, nbf) are specified in seconds. Passing Date.now() directly into an exp claim produces a token that expires around the year 56,000 — and a security review that will not be kind to you.

The quick check is digit count: a current timestamp in seconds has 10 digits, in milliseconds 13. This tool applies that rule automatically, and lets you override it.

The year 2038 problem

Systems that store Unix time in a signed 32-bit integer overflow on 19 January 2038, when the value exceeds 2,147,483,647. The counter wraps to negative, and the date jumps back to December 1901.

Modern 64-bit systems and every mainstream language runtime use wider types and are unaffected — a 64-bit signed count of seconds lasts about 292 billion years. The remaining exposure is in embedded devices, old file formats and database columns explicitly declared as 32-bit integers.

Choosing a format for APIs

Store and transmit instants either as an integer epoch or as ISO 8601 with an explicit offset (2026-08-14T15:30:00Z). Both are unambiguous. What causes incidents is anything else: 08/14/2026 is read as 14 August in the US and rejected elsewhere, and a bare 2026-08-14 15:30:00 with no offset means different instants in different places.

A useful discipline is to keep everything in UTC internally and convert to local time only at the presentation layer. This tool shows both so you can spot the moment where an off-by-a-few-hours error creeps in.

Frequently asked questions

How do I tell seconds from milliseconds?

Count the digits. A current timestamp in seconds has 10 digits; in milliseconds it has 13. If a date lands in 1970 you probably passed milliseconds where seconds were expected; if it lands tens of thousands of years ahead, the reverse.

Does a Unix timestamp have a timezone?

No. It counts seconds since a fixed instant in UTC, so it identifies the same moment everywhere. Timezones only matter when you render it for a human, which is why this tool shows UTC and your local time side by side.

What is the year 2038 problem?

Systems storing Unix time in a signed 32-bit integer overflow on 19 January 2038 and wrap around to 1901. Modern 64-bit systems are unaffected. The risk today is concentrated in embedded devices and legacy 32-bit database columns.

Can I convert a date back into a timestamp?

Yes. Enter a date in the second field and you get both the seconds and the milliseconds value. ISO 8601 with an explicit offset is the safest input format, since other formats are interpreted differently by different browsers.

Why is my JWT expiry date in the year 56,000?

Because a millisecond value was written into a claim that must be in seconds. The exp, iat and nbf claims are specified as NumericDate, meaning seconds since epoch. Divide Date.now() by 1000 before using it.

Do Unix timestamps account for leap seconds?

No. Unix time treats every day as exactly 86,400 seconds, so a leap second is absorbed by repeating a value rather than adding one. This makes arithmetic simple and is why Unix time drifts slightly from true elapsed physical time.

Developers

JWT Decoder

Decode the header and payload of a JWT without the token ever leaving your browser.

Developers

.env Validator

Catch quoting, duplicate and syntax bugs in a .env file before they break your deploy.

Developers

Cron Expression Parser

Translate a cron expression into plain English and see exactly when it runs next.