Timestamp Converter — Convert Unix Timestamps to Dates Online

Paste a Unix timestamp and see the human-readable date instantly — or pick a date and get the timestamp. Handles both seconds (10 digits) and milliseconds (13 digits) automatically. Shows ISO 8601, local time, and UTC. Runs in your browser, no server involved.

Timestamp to Datetime
Datetime to Timestamp

Unix Timestamps Explained

A Unix timestamp is simply the number of seconds since January 1, 1970 00:00:00 UTC (the "epoch"). Right now it's somewhere around 1.7 billion. That's it — one integer representing a point in time, no timezone ambiguity, no formatting debates.

Why developers love it: timestamps are trivial to compare (bigger number = later time), sort, and store (one integer column vs. a datetime type with timezone metadata). Every language has built-in conversion: JavaScript's Date.now() returns milliseconds, Python's time.time() returns seconds, and databases like PostgreSQL store timestamps internally as microseconds since epoch.

The milliseconds vs seconds confusion is real. JavaScript and Java use milliseconds (13 digits: 1715600000000). Unix/Linux, Python, PHP, and most APIs use seconds (10 digits: 1715600000). If your converted date shows up as January 1970, you probably passed seconds to a function expecting milliseconds (or vice versa). This tool auto-detects based on digit count.

The 2038 problem: 32-bit signed integers max out at 2,147,483,647 — which is January 19, 2038 03:14:07 UTC. After that, 32-bit timestamps overflow to negative numbers (wrapping to December 1901). Most modern systems use 64-bit timestamps now, but embedded systems, legacy databases, and some file formats still use 32-bit. If you're building something that needs to work past 2038, verify your timestamp storage is 64-bit.

How to Use

  1. Enter a Unix timestamp (seconds or milliseconds) — the tool auto-detects which.
  2. Or pick a date/time to convert to a timestamp.
  3. Results show in ISO 8601, your local timezone, and UTC simultaneously.
  4. Use "Get Current Timestamp" for the current time as a Unix timestamp.

When You'll Use This

Reading timestamps in API responses and logs

An API returns {"created_at": 1715600000} and you need to know what date that is. Or your server logs show [1715600000.123] and you need to correlate with a user report that says "it happened around 2pm." Paste the number, get the date.

Debugging JWT token expiration

JWT tokens have an "exp" claim that's a Unix timestamp. When a user reports "my token expired too early," decode the JWT, grab the exp value, paste it here, and see exactly when it was set to expire. Compare with the current timestamp to see if the issue is clock skew or wrong expiry duration.

Setting cache TTLs and cron schedules

Need to set a cache expiry 24 hours from now? Get the current timestamp, add 86400 (seconds in a day), and you have your expiry timestamp. Need to verify a cron job ran at the right time? Convert the log timestamp to confirm.

Database queries with timestamp columns

Your database stores created_at as an integer timestamp. To query "all records from last week," you need the timestamp for 7 days ago. Convert today's date to a timestamp, subtract 604800 (7 × 86400), and use that in your WHERE clause.

Common Gotchas

1.

Seconds vs milliseconds — check the digit count

10 digits = seconds (Unix standard). 13 digits = milliseconds (JavaScript, Java). If your date converts to January 1970, you're mixing them up. This tool auto-detects, but your code might not. Always check what your API/library expects.

2.

Timestamps are UTC — timezone display is local

The timestamp 1715600000 is the same moment everywhere in the world. But when you convert it to a date, the display depends on timezone. "May 13, 2024 12:00 UTC" is "May 13, 2024 20:00" in China (UTC+8). Always store and transmit timestamps in UTC; convert to local only for display.

3.

Don't use timestamps for scheduling across DST changes

If you schedule "every day at 9am local time" using timestamps, you'll be off by an hour after DST transitions. Timestamps don't know about DST — they're just seconds since epoch. For recurring local-time events, store the time as "09:00 America/New_York" and compute the next occurrence dynamically.

4.

Negative timestamps are valid (dates before 1970)

Timestamp -86400 is December 31, 1969. Some systems don't handle negative timestamps correctly (they crash or return wrong dates). If you need to represent dates before 1970, test your stack thoroughly. ISO 8601 date strings are often safer for historical dates.

Examples

Seconds timestamp → date

A typical 10-digit Unix timestamp from an API response.

Input

1715600000

Output

2024-05-13T12:53:20.000Z (UTC) — Mon May 13 2024

Milliseconds timestamp → date

A 13-digit JavaScript timestamp (Date.now() output).

Input

1715600000000

Output

2024-05-13T12:53:20.000Z (UTC) — same moment, just millisecond precision

Features

  • Auto-detects seconds (10 digits) vs milliseconds (13 digits)
  • Bidirectional: timestamp → date and date → timestamp
  • Shows ISO 8601, local time, and UTC simultaneously
  • One-click "Get Current Timestamp" button
  • Handles negative timestamps (dates before 1970)
  • Runs 100% in your browser — no data sent to servers

Frequently Asked Questions

Why does my timestamp convert to January 1, 1970?

You're probably passing a seconds timestamp (10 digits) to a function that expects milliseconds (13 digits). Multiply by 1000: new Date(1715600000 * 1000). Or the reverse: dividing a milliseconds timestamp by 1000 when it's already in seconds gives you a date in 1970. Check the digit count.

What's the maximum Unix timestamp?

For 32-bit signed integers: 2,147,483,647 (January 19, 2038 03:14:07 UTC). For 64-bit: 9,223,372,036,854,775,807 (about 292 billion years from now). JavaScript's Date object uses milliseconds in a 64-bit float, accurate to about ±285,000 years from epoch.

How do I get the current Unix timestamp in different languages?

JavaScript: Math.floor(Date.now() / 1000). Python: int(time.time()). PHP: time(). Java: System.currentTimeMillis() / 1000. Go: time.Now().Unix(). All return seconds except JavaScript's Date.now() which returns milliseconds.

Are Unix timestamps affected by leap seconds?

No. Unix time ignores leap seconds — it pretends every day has exactly 86400 seconds. When a leap second occurs, Unix time either repeats a second or skips one (depending on implementation). This means Unix timestamps don't perfectly align with UTC, but the drift is at most 1 second and is corrected by NTP.

Should I store dates as timestamps or ISO strings in my database?

For most cases, use your database's native timestamp/datetime type (PostgreSQL's TIMESTAMPTZ, MySQL's DATETIME). They handle timezone conversion and comparison natively. Use integer timestamps when you need: maximum query speed on indexed columns, compatibility with systems that only speak Unix time, or when you're storing in a key-value store without date types.

Tips & Related Workflows