How-To Guide

How to Convert Unix Timestamps Online: Step-by-Step Guide

Convert Unix timestamps to human-readable dates and vice versa online for free. Essential for debugging APIs, logs, and databases with epoch time values.

Published 2026-03-09

Try it right now — free, no sign-up

Use the embedded tool directly in your browser. Your data never leaves your device.

Open Tool →

Unix timestamps appear everywhere in software development — API responses, database columns, JWT tokens, log files, and S3 object keys. But a timestamp like 1709942400 is meaningless without conversion. This guide shows you how to convert Unix timestamps online instantly.

What is a Unix Timestamp?

A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have elapsed since the Unix Epoch — January 1, 1970, 00:00:00 UTC. It's a timezone-independent way to represent a specific moment in time.

  • Seconds — Standard Unix timestamp: 1709942400
  • Milliseconds — JavaScript timestamps: 1709942400000
  • Microseconds — Python's time.time() returns floats: 1709942400.123456

Step-by-Step: How to Convert Timestamps Online

  1. Open the tool — Visit the Unix Timestamp Converter.
  2. Paste the timestamp — Enter the Unix timestamp you found in an API response or log file.
  3. Read the converted date — See the UTC and local time equivalents immediately.
  4. Convert the other way — Enter a date to get the corresponding Unix timestamp.

Real-World Use Cases

1. Debugging JWT Token Expiration

JWT tokens contain iat (issued at) and exp (expiration) claims as Unix timestamps:

// JWT payload (after base64 decode)
{
  "sub": "user_123",
  "iat": 1709942400,   // issued at: 2026-03-09 00:00:00 UTC
  "exp": 1710028800    // expires: 2026-03-10 00:00:00 UTC (24h later)
}

// Check if token is expired in JavaScript
const now = Math.floor(Date.now() / 1000);  // current Unix timestamp
const isExpired = payload.exp < now;
console.log(isExpired ? "Token expired" : "Token valid");

2. Reading Database Timestamps

Many databases store timestamps as integers for performance:

-- PostgreSQL: convert Unix timestamp to readable date
SELECT to_timestamp(1709942400) AS created_at;
-- → 2026-03-09 00:00:00+00

-- MySQL equivalent
SELECT FROM_UNIXTIME(1709942400) AS created_at;
-- → 2026-03-09 00:00:00

-- Python equivalent
from datetime import datetime, timezone
dt = datetime.fromtimestamp(1709942400, tz=timezone.utc)
print(dt.isoformat())
# → 2026-03-09T00:00:00+00:00

3. Creating Time-Based Cache Busters

import time

# Generate a cache-busting URL parameter
timestamp = int(time.time())  # e.g., 1709942400

# Use in URLs to bypass browser cache
url = f"https://example.com/api/data?_t={timestamp}"
# → https://example.com/api/data?_t=1709942400

Common Mistakes to Avoid

  • Confusing seconds and milliseconds — JavaScript's Date.now() returns milliseconds; Unix timestamps are in seconds. Divide by 1000 when converting between them.
  • Ignoring timezone differences — Unix timestamps are always UTC. Display them in the user's local timezone for UI, but store and compare as UTC.
  • The Year 2038 Problem — 32-bit signed integers can only store timestamps up to January 19, 2038. Use 64-bit integers for all new code.
  • Storing dates as strings in databases — Use native timestamp types (TIMESTAMP, DATETIME) or integer Unix timestamps. String dates are slow to query and compare.

Related Tools

  • JWT Decoder — Decode JWT tokens that contain timestamp claims
  • JSON Formatter — Format API responses containing timestamp fields
  • UUID Generator — Generate time-based UUIDs for distributed systems

Ready to try it?

Free online tool — no download, no account, works in your browser.

Open Convert Unix Timestamps Online: Step-by-Step Guide Tool →

Related Articles