Epoch / Unix Timestamp Converter

Converts Unix epoch timestamps to human-readable dates — and dates back to epoch. Seconds and milliseconds are auto-detected. Every conversion runs in your browser.

Last updated:

Current Unix time
Epoch → Date
Seconds (10 digits) or milliseconds (13 digits) — auto-detected.
Date → Epoch
Pick in your local time zone.

Epoch → Date

UTC
Local time
ISO 8601
Relative
Day of week
Detected unit

Date → Epoch

Epoch (seconds)
Epoch (milliseconds)

When this converter earns its keep

Reconstructing what happened when

Logs, database rows and API payloads express the same instant three ways: seconds, milliseconds and ISO strings. Until everything is normalised to one form, "which happened first?" has no trustworthy answer.

Verifying token and cache lifetimes

JWT exp claims, cookie expiries and cache TTLs all speak epoch. Converting the raw number to a readable date answers the practical question: when exactly does this session die?

Auditing anything that stores time in 32 bits

Embedded firmware, old file formats and legacy protocol fields still carry 32-bit timestamps. The worked example below shows precisely where that ceiling sits.

Worked example: the exact second of the 2038 problem

The year-2038 problem is usually described vaguely. The numbers involved are exact, so it is worth walking through them.

  1. The largest value a signed 32-bit integer can hold is 2147483647.
  2. Read as epoch seconds, that is 2038-01-19 03:14:07 UTC; paste it into the converter to check.
  3. One second later the counter wraps to -2147483648.
  4. That value decodes to 1901-12-13 20:45:52 UTC: the clock does not stop, it jumps back 136 years.
  5. A 64-bit time_t moves the ceiling out by roughly 292 billion years, which is why modern platforms are safe.

The operating systems are largely fixed; the leftovers are not. File formats with 32-bit header fields, INT columns holding epoch values, and embedded devices that never get updates will all meet January 2038 eventually. The audit that matters is of serialized data and schemas, not of the kernel.

Four mistakes worth avoiding

Feeding seconds to a milliseconds API

When every date in the UI renders as January 1970, a seconds value has been handed to something expecting milliseconds. The reverse mistake throws dates tens of thousands of years into the future. Digit count tells them apart: ten versus thirteen.

Storing epoch milliseconds in a 32-bit field

In seconds, 32 bits last until 2038. In milliseconds, 2147483647 is only 24.86 days: any uptime counter or duration field built this way overflows within a month. Millisecond values always need 64 bits.

Trusting the default parse of a date-only string

JavaScript reads the ISO form 2026-08-08 as UTC midnight, but reads 2026-08-08T00:00:00 and 08/08/2026 as local midnight, and several date libraries disagree with all of that. The same calendar date therefore becomes a different instant depending on the format alone. Attach an explicit offset instead of relying on the parser's default.

Counting on leap seconds

Unix time pretends leap seconds do not exist: days are always exactly 86400 seconds. Systems that need real elapsed time across a leap second must use monotonic clocks, not wall-clock epoch arithmetic.

Tools commonly used alongside this one

  • Cron Expression Parser Parse a cron expression field by field and see the next run times. For Kubernetes CronJobs and scheduled tasks.
  • JWT Decoder Decode the header and payload of a JSON Web Token, inspect the standard claims and expiry. The token never leaves your browser.
  • Hash Generator (SHA) Compute SHA-1, SHA-256, SHA-384 and SHA-512 digests of text instantly. Via the Web Crypto API, in the browser.
  • HTML / Entity Encoder-Decoder Encode text to HTML entities or decode it back. Escape special characters to prevent XSS; in the browser, no signup.
  • HTML Viewer Paste HTML source and preview it live instantly. In a sandboxed, isolated frame; scripts are disabled for safety.

Frequently Asked Questions

What is Unix epoch time?

Unix epoch time (POSIX time) is the number of seconds elapsed since 1 January 1970 00:00:00 UTC. Because it is a single number independent of time zones, it is the timestamp standard in logs, APIs and distributed systems.

How do I tell seconds from milliseconds?

An epoch in seconds is 10 digits today; in milliseconds it is 13 digits. This tool auto-detects the unit from the digit count. Unix tools and most databases use seconds, while JavaScript's Date.now() uses milliseconds.

Why are epoch timestamps in UTC?

Epoch counts elapsed time since a fixed instant (1970 UTC); it carries no time zone. You convert it to local time for display, but always storing epoch (UTC) avoids bugs caused by time zones and daylight saving.

What is the year 2038 problem?

Systems that store epoch in a signed 32-bit integer overflow on 19 January 2038 at 03:14:07 UTC. Modern systems use a 64-bit integer, which gives a practically unlimited range. In .NET, DateTimeOffset does not suffer from this.

How do I produce an epoch in .NET?

DateTimeOffset.UtcNow.ToUnixTimeSeconds() gives the epoch in seconds, and ToUnixTimeMilliseconds() gives it in milliseconds. To convert back, use DateTimeOffset.FromUnixTimeSeconds(value).