Timestamp · Date & Time

Unix Timestamp Converter: Epoch to Human-Readable Date

Unix timestamps explained — what they are, how to convert them, and common debugging scenarios.

What is a Unix Timestamp?

A Unix timestamp (epoch time) is the number of seconds elapsed since January 1, 1970 00:00:00 UTC. It's the most common way to store dates in databases, APIs, and log files because it's timezone-independent and easy to compare.

1704067200  →  2024-01-01 00:00:00 UTC

Seconds vs Milliseconds

Different systems use different precisions:

Quick way to tell: if the number has 13 digits, it's milliseconds. 10 digits = seconds.

Convert Timestamps in Code

# JavaScript — current timestamp
Date.now()                    // milliseconds
Math.floor(Date.now() / 1000) // seconds

# JS — timestamp to date
new Date(1704067200 * 1000).toISOString()
// → "2024-01-01T00:00:00.000Z"

# Python
import datetime
datetime.datetime.fromtimestamp(1704067200, tz=datetime.UTC)

# SQL (PostgreSQL)
SELECT TO_TIMESTAMP(1704067200);
SELECT EXTRACT(EPOCH FROM NOW())::BIGINT;

# Bash
date -d @1704067200
date -r 1704067200  # macOS

Common Timestamp Issues

JWT Expiry Debugging

JWT tokens use Unix timestamps for exp (expiration) and iat (issued at) claims. Paste the timestamp from your JWT into our converter to check if it's expired. Tip: use our JWT Decoder which converts these automatically.

privacy

Everything runs in your browser.

Format JSON, decode JWT, count words, generate hashes, and convert text without uploading your input.

workflow

Bookmark once, reuse daily.

A compact toolbox for recurring developer, writing, SEO, and AI-content checks.

rootnest

Part of the RootNest product stack.

Use it with OnePost, 周报侠, 内容搭子Pro, and other small focused tools.