Unix Timestamp Converter

Convert between Unix timestamps and human dates.

Open tool

Overview

Convert between Unix timestamps (seconds or milliseconds since 1970-01-01 UTC) and human-readable date strings in either direction. Handles common edge cases: leading-zero handling, millisecond vs second detection, and timezone conversion between UTC and your local time.

It's for developers reading log files, debugging API responses with iat/exp fields, or scheduling events. Reach for it when a Slack message says "the alert fired at 1735689600" and you want to know what time of day that actually was, or when crafting a JWT with a specific expiry.

How it works

A Unix timestamp counts seconds (or, in modern JS, milliseconds) since the Unix epoch: 1970-01-01T00:00:00Z. The converter auto-detects scale - timestamps under ~10^11 are interpreted as seconds (covering all dates until the year 5138), larger values as milliseconds.

The output shows both UTC and your local time alongside, with the timezone offset noted. ISO 8601 form is the primary display format because it's unambiguous and sortable.

Examples

  • Seconds to date:
    1735689600  ->  2025-01-01T00:00:00Z
    
  • Milliseconds to date:
    1735689600000  ->  2025-01-01T00:00:00.000Z
    
  • Date to timestamp:
    2026-05-18T12:00:00Z  ->  1779451200 (seconds), 1779451200000 (ms)
    
  • Current time:
    now  ->  whatever the current Unix timestamp is
    

FAQ

Seconds, milliseconds, or microseconds?

Unix timestamps were originally seconds (C's time_t). JavaScript's Date.now() returns milliseconds. Linux high-precision APIs use microseconds or nanoseconds. The converter handles seconds and milliseconds; for higher precision, divide first.

What's the year-2038 problem?

32-bit signed time_t overflows on 2038-01-19T03:14:07Z. Modern systems use 64-bit timestamps which won't overflow for ~292 billion years. If your stack still uses 32-bit timestamps somewhere, that's a bug to find.

How do I get the current timestamp in code?

Math.floor(Date.now() / 1000) in JavaScript, time.time() in Python (returns float), DateTimeOffset.UtcNow.ToUnixTimeSeconds() in C#, date +%s in Bash.

Does it handle pre-1970 dates?

Yes - timestamps can be negative for dates before the epoch. Some database systems reject negative timestamps in DATETIME columns; check your storage layer.

Try Unix Timestamp Converter

An unhandled error has occurred. Reload ×