Unix Epoch Converter

Live seconds since Jan 1, 1970 — convert dates to/from epoch.

Current Unix Epoch
1,774,069,789
20,533 days, 5h 9m 49s since Jan 1, 1970
1 minute
60s
1 hour
3,600s
1 day
86,400s
1 year
31,536,000s

Unix Epoch Converter — What It Does

Enter a Unix timestamp to convert it to a human-readable date and time, or pick a date to get its epoch value. A live counter shows the current Unix timestamp ticking in real time. Useful for debugging API responses, reading log files, working with database fields, and understanding time-based tokens.

Unix Timestamp Quick Reference

  • Epoch origin — January 1, 1970 00:00:00 UTC = 0
  • Seconds — Standard Unix timestamp, 10 digits today
  • Milliseconds — JavaScript-style, multiply seconds by 1000
  • Negative values — Dates before 1970 are represented as negative integers

Getting the Current Epoch Timestamp

  • date +%s — Bash / Linux / macOS
  • Math.floor(Date.now()/1000) — JavaScript (seconds)
  • import time; time.time() — Python
  • Instant.now().getEpochSecond() — Java
  • time.Now().Unix() — Go

Common Pitfalls

  • Milliseconds vs seconds confusion — JavaScript returns milliseconds; most server-side systems expect seconds. Always check the magnitude of the value.
  • Storing as a string — Epoch values in JSON are often strings; parse to integer before arithmetic.
  • 32-bit overflow — Avoid signed 32-bit integer columns for timestamps if the system must operate past January 2038.

Frequently Asked Questions

What is a Unix epoch timestamp?
A Unix timestamp is the number of seconds elapsed since January 1, 1970 00:00:00 UTC — also called the Unix epoch or POSIX time. It provides a single, timezone-independent integer for any point in time, making it ideal for databases, APIs, and log files.
Why does my JavaScript timestamp have 13 digits instead of 10?
JavaScript's Date.now() and getTime() return milliseconds since the epoch, so the value is 1000x larger than a standard Unix timestamp in seconds. Divide by 1000 to convert to seconds when working with systems that expect 10-digit timestamps.
What is the Unix Year 2038 problem?
Traditional 32-bit signed integers can only store values up to 2,147,483,647, which corresponds to January 19, 2038 at 03:14:07 UTC. Systems still using 32-bit time_t will overflow at that point. Modern 64-bit systems handle timestamps far into the future without issue.
How do I get the current Unix timestamp in different languages?
In Python: import time; time.time(). In JavaScript: Math.floor(Date.now()/1000). In Bash: date +%s. In PHP: time(). In Java: Instant.now().getEpochSecond(). In Go: time.Now().Unix().
Are Unix timestamps affected by timezone or daylight saving time?
No. Unix timestamps are always in UTC and have no concept of timezone or daylight saving time. They represent a fixed universal moment. Timezone conversion happens only when displaying the timestamp as a human-readable date.