Guides · Formatting

Unix Timestamp Converter Online: The Complete Guide

Learn how to convert Unix timestamps online, understand epoch time, debug time-related API issues, and handle seconds vs milliseconds.

Last updated: May 4, 2026

What is a Unix timestamp?

A Unix timestamp (also called Unix time, POSIX time, or epoch time) is the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC. It is the universal standard for representing time as a single integer in computer systems, APIs, databases, and log files.

The reference point — January 1, 1970 — is called the Unix epoch. Any moment in time can be expressed as the number of seconds before (negative) or after (positive) this epoch. For example, the Unix timestamp 1715000000 represents May 6, 2024 at approximately 20:53:20 UTC.

Seconds vs milliseconds — the most common confusion

Unix timestamps in seconds are 10 digits: 1715000000 (May 2024). JavaScript and many modern APIs use milliseconds (13 digits): 1715000000000. Confusing the two is one of the most common timestamp bugs in development.

Seconds (10 digits)

1715000000

Used by: Unix systems, databases, JWT exp/iat claims, Python datetime

Milliseconds (13 digits)

1715000000000

Used by: JavaScript Date.now(), Java System.currentTimeMillis(), many REST APIs

The Timestamp Converter auto-detects seconds vs milliseconds by checking the magnitude of the input, so you don't need to remember which one you're looking at.

How to convert Unix timestamps online

Unix timestamp to human-readable date

Open the Timestamp Converter, paste the Unix timestamp in the input field, and the readable date appears instantly. Both UTC and local time are shown. Works for seconds and milliseconds.

Date/time to Unix timestamp

Enter a date string (ISO 8601 format recommended: 2024-05-06T20:53:20Z) and the tool outputs the corresponding Unix timestamp in both seconds and milliseconds.

Current time

Many tools show the current Unix timestamp live, useful for quick reference when writing tests, setting token expiry times, or checking log timestamps.

Real-world debugging scenarios

Decoding JWT exp and iat claims

JWT tokens store expiry (exp) and issued-at (iat) as Unix timestamps in seconds. After decoding a JWT with the JWT Decoder, paste the exp value into the timestamp converter to see the exact expiry date and time.

Reading log file timestamps

Application logs from systems like Nginx, Kubernetes, and cloud providers often include Unix timestamps. Convert them instantly to understand the sequence of events during an incident.

Database timestamp inspection

Many databases store timestamps as Unix integers for performance. When inspecting rows directly in a database client, paste the stored value to convert it to a readable date for debugging.

Setting future expiry times

When creating API tokens, cache TTLs, or scheduled jobs that need a specific expiry time, convert your target date to a Unix timestamp to use as the exact value in configuration or code.

Converting timestamps in code

JavaScript / TypeScript

// Current timestamp
const seconds = Math.floor(Date.now() / 1000);
const ms = Date.now();

// Unix to Date
const date = new Date(1715000000 * 1000);

// Date to Unix
const ts = Math.floor(new Date('2024-05-06').getTime() / 1000);

Python

import time
from datetime import datetime, timezone

# Current timestamp
ts = int(time.time())

# Unix to datetime
dt = datetime.fromtimestamp(1715000000, tz=timezone.utc)

# datetime to Unix
ts = int(datetime(2024, 5, 6, tzinfo=timezone.utc).timestamp())

Go

import "time"

// Current timestamp
ts := time.Now().Unix()

// Unix to Time
t := time.Unix(1715000000, 0).UTC()

// Time to Unix
ts = time.Date(2024, 5, 6, 0, 0, 0, 0, time.UTC).Unix()

The Year 2038 problem

On 32-bit systems, Unix timestamps are stored as a signed 32-bit integer, which overflows at 2147483647 — January 19, 2038, at 03:14:07 UTC. After this point, 32-bit systems would wrap around to negative values, potentially causing serious bugs.

Modern 64-bit systems and most programming languages use 64-bit integers for timestamps, extending the range to the year 292 billion CE. If you are still maintaining 32-bit systems or using 32-bit integer columns for timestamp storage, this is a real concern to address before 2038.

Frequently asked questions

What is the current Unix timestamp?

You can get the current Unix timestamp in JavaScript with Math.floor(Date.now() / 1000), in Python with int(time.time()), and in the terminal with date +%s on Linux/macOS.

Why do some APIs use timestamps in nanoseconds?

High-performance systems (financial trading, distributed databases like InfluxDB) use nanosecond precision (19-digit integers) for sub-millisecond event ordering. These are less common in standard REST APIs but appear in observability and time-series tools.

Is Unix time timezone-independent?

Yes. Unix timestamps always represent a single moment in UTC time. Timezone conversion happens at display time only. This is one of the key advantages: storing timestamps as Unix integers avoids timezone ambiguity entirely.

What is ISO 8601 and how does it relate to Unix time?

ISO 8601 is a human-readable date format standard: 2024-05-06T20:53:20Z. It can represent the same moment as a Unix timestamp. Many APIs accept both formats; Unix timestamps are more efficient for storage and arithmetic, while ISO 8601 is more readable.

How do I handle daylight saving time with Unix timestamps?

Unix timestamps are immune to DST. Since they represent UTC seconds, there is no DST ambiguity in the stored value. DST only affects the local-time display of a timestamp, not the value itself. Always store and transmit timestamps in UTC.