Toolerax logoToolerax

Epoch / Unix Timestamp Converter

Convert Unix timestamps to dates and back.

100% private — runs in your browser, nothing is uploaded.

Current Unix timestamp
—

Timestamp → Date

Detected as seconds.

UTC (ISO 8601)2023-11-14T22:13:20.000Z
UTCTue, 14 Nov 2023 22:13:20 GMT
Local timeTue Nov 14 2023 22:13:20 GMT+0000 (Coordinated Universal Time)

Date → Timestamp

How to use the Epoch / Unix Timestamp Converter

  1. 1
    Check the current time

    The live current Unix timestamp is shown at the top and updates every second.

  2. 2
    Convert a timestamp

    Paste a Unix timestamp to see the date in ISO, UTC and local time.

  3. 3
    Convert a date

    Pick a date and time to get its Unix timestamp in seconds and milliseconds.

  4. 4
    Copy what you need

    Use the copy buttons to grab any value for your code or logs.

Examples

InputOutput
17000000002023-11-14T22:13:20Z (UTC)
Date → timestampseconds and milliseconds

Free online epoch & Unix timestamp converter

This epoch converter turns Unix timestamps into human-readable dates and back again. It shows the live current timestamp, converts in both directions, and displays results in UTC and your local timezone — essential for developers working with logs, APIs and databases.

Why Unix time is everywhere

Because it is just a single number counting seconds from a fixed point (1 January 1970 UTC), Unix time is compact, easy to compare and free of timezone ambiguity. It is used in log files, databases, JWT expiry claims, HTTP headers and countless APIs.

Seconds vs milliseconds

Many languages use seconds, but JavaScript's Date.now() returns milliseconds. This tool auto-detects which you pasted (13+ digits means milliseconds) and gives you both units when converting a date, so you never send the wrong scale. Everything runs in your browser, keeping your data private and available offline.


What is a Unix timestamp (epoch time)? A developer's guide

A Unix timestamp — also called epoch time — is how computers actually store a moment in time. If you have ever seen a number like 1700000000 in a log file, a database column or an API response, that is it. It is a beautifully simple idea that solves a genuinely hard problem, and it has a small number of traps that catch almost every developer at least once.

The definition

A Unix timestamp is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970 — a moment called the epoch.

So 1700000000 is 1.7 billion seconds after that instant, which lands on 14 November 2023. Times before 1970 are simply negative numbers.

Why 1970? It is arbitrary. The engineers building early Unix needed a starting point, picked a recent round date, and it stuck. There is no deeper significance to it.

Why it is such a good idea

Storing dates as text is a nightmare, and the timestamp avoids all of it:

  • It is unambiguous. Is 03/04/2026 the 3rd of April or the 4th of March? It depends which country you are in. 1775520000 means exactly one instant, everywhere.
  • Comparison and arithmetic are trivial. A bigger number is a later time. The gap between two moments is a subtraction. No calendar logic, no month lengths, no leap-year rules.
  • It is compact. A whole date and time in a single integer.
  • It sorts correctly with no special handling.

You will find epoch time in databases, HTTP headers, cookies, file metadata, and the exp and iat claims inside every JSON Web Token.

Trap 1: seconds vs. milliseconds

This is the most common bug in the entire topic, and everyone hits it.

Most languages — and the Unix definition itself — count epoch time in seconds. But JavaScript's Date.now() returns milliseconds. So does Java. Mix the two and your date is wrong by a factor of 1,000.

The symptom is unmistakable once you know it:

  • Your date shows as 1970. You fed a seconds value into something expecting milliseconds. 1.7 billion milliseconds is only about 20 days after the epoch.
  • Your date is in the year 55,000. You fed milliseconds into something expecting seconds.

The quick check is the digit count. A current timestamp in seconds is 10 digits. In milliseconds it is 13 digits. Count them — it takes a second and it tells you immediately which you have.

Trap 2: a timestamp has no timezone

This confuses people constantly, and getting it straight prevents a whole class of bugs.

A Unix timestamp is always UTC. It does not carry a timezone, because it does not need one — it identifies an instant, and an instant is the same instant everywhere in the world.

When it is 3pm in London it is simultaneously 10am in New York. Those are the same moment, and the same timestamp. The timezone only matters when you display the time to a human.

This gives you the correct architecture for handling time, and it is worth stating as a rule:

Store timestamps in UTC. Convert to a local timezone only at the moment of display.

Storing local times in a database is how you end up with data that is wrong twice a year, when daylight saving shifts and an hour is either repeated or skipped entirely.

Trap 3: leap seconds

A subtlety with a strange resolution. The Earth's rotation is not perfectly regular, so occasionally a leap second is inserted into UTC to keep clocks aligned with the planet.

Unix time ignores them. It pretends every day has exactly 86,400 seconds. This means Unix time is not, strictly, the true count of elapsed seconds since 1970 — it is off by the number of leap seconds that have occurred.

This is a deliberate trade. Handling leap seconds properly would make every date calculation depend on an unpredictable table of past adjustments. Pretending they do not exist keeps the arithmetic simple, at the cost of a handful of seconds of accuracy that virtually no application cares about.

The year 2038 problem

Older systems store the timestamp in a signed 32-bit integer, which can hold a maximum of 2,147,483,647.

That many seconds after the epoch falls on 19 January 2038. One second later, the integer overflows and wraps around to a large negative number — which is interpreted as December 1901. Systems that do date arithmetic will behave as though time has run backwards by 136 years.

This is a genuine, dated version of the Y2K problem, and it is a real concern for embedded systems, old databases and industrial equipment that may still be running in 2038.

The fix is straightforward and already widespread: use a 64-bit integer. That pushes the limit roughly 292 billion years into the future, which is comfortably longer than the universe has existed. For any new code, this is a non-issue.

Common mistakes to avoid

  • Mixing seconds and milliseconds. Count the digits: 10 or 13.
  • Storing local time instead of UTC. Store UTC; convert on display.
  • Storing a timestamp as a string. Use an integer or a proper timestamp column.
  • Using 32-bit storage for anything expected to outlive 2038.
  • Assuming a day is always 86,400 seconds in local time. On daylight-saving days it is not — which is exactly why you should do date arithmetic in UTC.

Next steps

To see the same instant across different cities, use the Time Zone Converter. Working with tokens? Use the JWT Decoder to inspect the epoch-time exp claim.

Frequently Asked Questions

What is a Unix timestamp?

A Unix timestamp (also called epoch time) is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, not counting leap seconds. It is a simple, timezone-free way to represent a moment in time.

How do I convert a timestamp to a date?

Paste the number into the Timestamp → Date box. The tool auto-detects whether it is in seconds or milliseconds and shows the date in ISO 8601, UTC and your local time.

Seconds or milliseconds — how does it know?

Unix timestamps in seconds are 10 digits for current dates, while millisecond timestamps (used by JavaScript) are 13 digits. Values of 13 digits or more are treated as milliseconds; shorter values as seconds.

How do I get the timestamp for a specific date?

Use the Date → Timestamp box and pick a date and time. The tool shows the equivalent Unix timestamp in both seconds and milliseconds.

What is the year 2038 problem?

Systems storing Unix time in a signed 32-bit integer overflow on 19 January 2038. Modern systems use 64-bit timestamps, which push the limit hundreds of billions of years away.

Is my data private?

Yes. All conversions run in your browser using the built-in date functions, so nothing is uploaded and the tool works offline.

Why does my converted date show as 1 January 1970?

This is a classic bug: the timestamp input was zero, null, or a seconds value was passed to a function expecting milliseconds (1.7 billion milliseconds is only ~20 days after 1970).

Can a Unix timestamp be negative?

Yes. Negative numbers represent dates and times before the 1 January 1970 epoch.

Related tools