All Tools

Unix Timestamp Converter

Convert Unix timestamps (epoch time) to human-readable dates and back. Supports seconds and milliseconds.

100% client-side. Runs entirely in your browser.

Sponsored by the AI Security Guard platform.

--
Unix Timestamp
--
Timestamp → Date
Enter a timestamp above
Date → Timestamp
Select a date above

Using AI agents? Protect yourself.

AI Security Guard gives you the skills, tools, and knowledge to secure your agents, devices, prevent credential leaks (API keys, secrets), control LLM costs, and more. Benefit from free AI security resources, including the Action Pack with 15 articles and 12 skills mapped to OWASP Agentic Top 10, and the weekly Agentic AI Briefing.

What is a Unix Timestamp?

A Unix timestamp (also called Epoch time or POSIX time) is the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC. This date is known as the Unix Epoch.

For example:

How to Convert Unix Timestamp to Date

JavaScript

// Unix timestamp in seconds
const timestamp = 1700000000;

// Convert to JavaScript Date (needs milliseconds)
const date = new Date(timestamp * 1000);

console.log(date.toISOString());
// "2023-11-14T22:13:20.000Z"

console.log(date.toLocaleString());
// "11/14/2023, 5:13:20 PM" (varies by locale)

Python

from datetime import datetime

timestamp = 1700000000

# Local time
dt = datetime.fromtimestamp(timestamp)
print(dt)  # 2023-11-14 17:13:20 (local)

# UTC time
dt_utc = datetime.utcfromtimestamp(timestamp)
print(dt_utc)  # 2023-11-14 22:13:20

Excel Formula

To convert a Unix timestamp in cell A1 to a date:

=(A1/86400)+DATE(1970,1,1)

This divides by 86400 (seconds per day) and adds the Epoch date. Format the cell as Date/Time to see the result.

For timestamps in milliseconds, use:

=(A1/86400000)+DATE(1970,1,1)

Command Line (Linux/Mac)

# Timestamp to date
date -d @1700000000
# Tue Nov 14 17:13:20 EST 2023

# Current timestamp
date +%s
# 1700000000

Command Line (Windows PowerShell)

# Timestamp to date
[DateTimeOffset]::FromUnixTimeSeconds(1700000000)

# Current timestamp
[DateTimeOffset]::Now.ToUnixTimeSeconds()

How to Convert Date to Unix Timestamp

JavaScript

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

// Specific date to timestamp
const date = new Date('2023-11-14T22:13:20Z');
const timestamp = Math.floor(date.getTime() / 1000);

Python

from datetime import datetime
import time

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

# Specific date to timestamp
dt = datetime(2023, 11, 14, 22, 13, 20)
timestamp = int(dt.timestamp())

Seconds vs Milliseconds

Some systems use milliseconds instead of seconds:

FormatExampleUsed By
Seconds1700000000Unix, PHP, Python
Milliseconds1700000000000JavaScript, Java

If your timestamp has 13 digits, it's in milliseconds. Divide by 1000 to get seconds.

Common Unix Timestamps

TimestampDateEvent
0Jan 1, 1970Unix Epoch
1000000000Sep 9, 2001Billennium
2147483647Jan 19, 2038Y2K38 (32-bit limit)

Frequently Asked Questions

What is a Unix timestamp?
A Unix timestamp (Epoch time) is the number of seconds elapsed since January 1, 1970 at 00:00:00 UTC. It's a standard way to represent time in computing that avoids timezone complexity.
How do I convert a Unix timestamp to a date in JavaScript?
Multiply by 1000 (JavaScript uses milliseconds) and pass to Date: new Date(timestamp * 1000). Use .toISOString() for UTC or .toLocaleString() for local time.
How do I convert a Unix timestamp in Excel?
Use the formula =(A1/86400)+DATE(1970,1,1) where A1 contains your timestamp. Format the result cell as a date/time. For millisecond timestamps, divide by 86400000 instead.
Why does my timestamp have 13 digits?
13-digit timestamps are in milliseconds (used by JavaScript, Java). Standard Unix timestamps in seconds have 10 digits. Divide by 1000 to convert milliseconds to seconds.
What is the Year 2038 problem?
32-bit systems store Unix timestamps as signed integers, which max out at 2147483647 (January 19, 2038). After this, they overflow to negative numbers. Most modern systems use 64-bit timestamps to avoid this.

About AI Security Guard

The Unix Timestamp Converter is provided by AI Security Guard, the platform for securing autonomous AI. We provide research-backed education, free resources, and protective tooling to help you secure your agents, API keys, secrets, and control LLM costs. Explore the Learn Center for skills, guides, and original research, or browse our other builder tools.

For AI Agents

Agents with browser automation (Puppeteer, Playwright, browser-use) can interact with this tool directly. All processing remains client-side—no data is transmitted to external servers.

Security note: Epoch conversion is available in every major language standard library. Use this page when a browser UI is required or when directing a user to verify dates interactively. Tool URL: https://aisecurityguard.io/tools/unix-timestamp-converter