Unix Timestamp Converter
Convert Unix timestamps (epoch time) to human-readable dates and back. Supports seconds and milliseconds.
Sponsored by the AI Security Guard platform.
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:
0= January 1, 1970 00:00:00 UTC1000000000= September 9, 2001 01:46:40 UTC1700000000= November 14, 2023 22:13:20 UTC
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:
| Format | Example | Used By |
|---|---|---|
| Seconds | 1700000000 | Unix, PHP, Python |
| Milliseconds | 1700000000000 | JavaScript, Java |
If your timestamp has 13 digits, it's in milliseconds. Divide by 1000 to get seconds.
Common Unix Timestamps
| Timestamp | Date | Event |
|---|---|---|
| 0 | Jan 1, 1970 | Unix Epoch |
| 1000000000 | Sep 9, 2001 | Billennium |
| 2147483647 | Jan 19, 2038 | Y2K38 (32-bit limit) |
Frequently Asked Questions
new Date(timestamp * 1000). Use .toISOString() for UTC or .toLocaleString() for local time.=(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.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