Unix Timestamp Converter

Convert between Unix timestamps and human-readable dates across timezones

Unix Timestamp (Seconds)Live
Current Date/Time

Smart Converter

Developer Cheat Sheet

Filter:
JavaScript
Web
Math.floor(Date.now() / 1000)
JavaScript (ms)
Web
Date.now()
TypeScript
Web
Math.floor(Date.now() / 1000)
Python
Backend
import time
int(time.time())
Python 3
Backend
from datetime import datetime
int(datetime.now().timestamp())
PHP
Backend
time()
Java
Backend
System.currentTimeMillis() / 1000L
Go
Backend
time.Now().Unix()
Ruby
Backend
Time.now.to_i
Rust
Backend
use std::time::{SystemTime, UNIX_EPOCH};
SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()
Swift
Mobile
Int(Date().timeIntervalSince1970)
Kotlin
Mobile
System.currentTimeMillis() / 1000
C#
Backend
DateTimeOffset.UtcNow.ToUnixTimeSeconds()
C++
System
#include <chrono>
std::chrono::duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count()
Bash
Shell
date +%s
PowerShell
Shell
[int][double]::Parse((Get-Date -UFormat %s))
MySQL
Database
SELECT UNIX_TIMESTAMP();
PostgreSQL
Database
SELECT EXTRACT(EPOCH FROM NOW());
MongoDB
Database
new Date().getTime() / 1000

About Unix Timestamps

What is a Unix Timestamp?

A Unix timestamp (or Epoch time) is the number of seconds that have elapsed since January 1, 1970 00:00:00 UTC. It's a universal way to represent dates independent of timezone and locale.

Supported Formats

This tool auto-detects seconds (10-digit), milliseconds (13-digit), microseconds (16-digit), nanoseconds (19-digit), ISO 8601 strings, and most human-readable date formats.

Common Time Units
1 minute = 60 seconds
1 hour = 3,600 seconds
1 day = 86,400 seconds
1 week = 604,800 seconds
1 year ≈ 31,536,000 seconds
Year 2038 Problem

32-bit systems store timestamps as signed integers, which will overflow on January 19, 2038. Modern systems use 64-bit integers, extending the range by billions of years.

Powered by CompileBytes