Unix Timestamp Converter - Epoch Time Converter Online
Free online Unix timestamp converter. Convert epoch time to date, seconds to milliseconds. Supports batch conversion with code examples for JavaScript, Python, Java, PHP, Go, C#, Rust and Bash.
Common Timestamps Reference
| Event | Timestamp | Date |
|---|---|---|
| Unix Epoch | 0 | 1970-01-01 00:00:00 UTC |
| 1 Billion Seconds | 1000000000 | 2001-09-09 01:46:40 UTC |
| 1234567890 Sequence | 1234567890 | 2009-02-13 23:31:30 UTC |
| 2 Billion Seconds | 2000000000 | 2033-05-18 03:33:20 UTC |
| Y2038 Problem (32-bit max) | 2147483647 | 2038-01-19 03:14:07 UTC |
Get Timestamp in Your Language
// Get current timestamp
const timestamp = Math.floor(Date.now() / 1000);
const timestampMs = Date.now();
// Timestamp to Date
const date = new Date(timestamp * 1000);
// Date to Timestamp
const ts = Math.floor(new Date('2024-01-01').getTime() / 1000); import time
from datetime import datetime
# Get current timestamp
timestamp = int(time.time())
timestamp_ms = int(time.time() * 1000)
# Timestamp to Date
date = datetime.fromtimestamp(timestamp)
# Date to Timestamp
ts = int(datetime(2024, 1, 1).timestamp()) import java.time.*;
// Get current timestamp
long timestamp = System.currentTimeMillis() / 1000;
long timestampMs = System.currentTimeMillis();
// Timestamp to Date
Instant instant = Instant.ofEpochSecond(timestamp);
LocalDateTime date = LocalDateTime.ofInstant(instant, ZoneId.systemDefault());
// Date to Timestamp
long ts = LocalDate.of(2024, 1, 1).atStartOfDay(ZoneId.systemDefault()).toEpochSecond(); <?php
// Get current timestamp
$timestamp = time();
$timestampMs = round(microtime(true) * 1000);
// Timestamp to Date
$date = date('Y-m-d H:i:s', $timestamp);
// Date to Timestamp
$ts = strtotime('2024-01-01'); package main
import "time"
// Get current timestamp
timestamp := time.Now().Unix()
timestampMs := time.Now().UnixMilli()
// Timestamp to Date
date := time.Unix(timestamp, 0)
// Date to Timestamp
ts := time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC).Unix() using System;
// Get current timestamp
long timestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
long timestampMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
// Timestamp to Date
DateTime date = DateTimeOffset.FromUnixTimeSeconds(timestamp).DateTime;
// Date to Timestamp
long ts = new DateTimeOffset(new DateTime(2024, 1, 1)).ToUnixTimeSeconds(); use std::time::{SystemTime, UNIX_EPOCH};
// Get current timestamp
let timestamp = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_secs();
// Timestamp to Date - use chrono crate
// let date = chrono::NaiveDateTime::from_timestamp(timestamp, 0); # Get current timestamp
date +%s # seconds
date +%s%3N # milliseconds
# Timestamp to Date
date -d @1704067200
# Date to Timestamp
date -d "2024-01-01" +%s Quick Reference
- • Unix timestamp counts seconds since January 1, 1970 (UTC)
- • 10-digit numbers are seconds, 13-digit are milliseconds
- • Negative timestamps represent dates before 1970
- • Maximum 32-bit timestamp: 2147483647 (Jan 19, 2038)
About This Tool
What is Unix Timestamp?
Unix timestamp (also known as Epoch time, POSIX time, or Unix Epoch) is the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC. This date is called the Unix Epoch. It's a widely used time representation in computer systems and programming.
Why Use Unix Timestamps?
Unix timestamps are timezone-independent, making them perfect for storing and comparing times across different regions. They're compact (just a number), easy to calculate with, and supported by virtually all programming languages.
Seconds vs Milliseconds
Standard Unix timestamps use seconds (10 digits, e.g., 1704067200). JavaScript and some modern systems use milliseconds (13 digits, e.g., 1704067200000). This tool automatically detects and handles both formats.
The Year 2038 Problem
32-bit systems store timestamps as signed integers, with a maximum value of 2147483647 (January 19, 2038). After this, the counter overflows. Modern 64-bit systems use 64-bit integers, extending the range to billions of years.
Frequently Asked Questions
What is a Unix timestamp?
How do I convert a timestamp to a date?
What's the difference between seconds and milliseconds timestamps?
Why do some timestamps start with a negative number?
What is the Year 2038 problem?
Is this tool free to use?
Related Tools
Free Base64 Encoder Decoder Online - Encode & Decode Base64
Free online Base64 encoder and decoder. Convert text to Base64 and decode Bas...
Free Color Picker - HEX RGB HSL Converter & Palette Generator
Free online color picker with format conversion. Convert between HEX, RGB, HS...
Free Diff Checker - Text Compare Tool
Free online diff checker. Compare two text files side by side or inline. Find...
Free Hash Generator - MD5 SHA-256 SHA-512 HMAC Calculator
Free online hash generator. Calculate MD5, SHA-1, SHA-256, SHA-512 hashes. Ge...
Free JSON Formatter & Validator Online - Pretty Print JSON
Free online JSON formatter, validator, and beautifier. Format, minify, and va...
Free JWT Encoder / Decoder - Sign, Verify & Inspect Tokens
Free online JWT Decoder and Encoder. Decode, inspect, verify signatures, edit...
Free Lorem Ipsum Generator - Paragraphs, Sentences, Words
Free online Lorem Ipsum placeholder text generator. Generate paragraphs, sent...
Free Online QR Code Generator - Create Custom QR Codes
Free online QR code generator. Create QR codes for URLs, text, WiFi, vCards. ...
Free & Unlimited TikTok Video Downloader Without Watermark
Download any TikTok video without watermark online for free. Fast, secure, an...
Free URL Encoder Decoder Online - Encode & Decode URLs
Free online URL encoder and decoder. Encode special characters for URLs or de...
Free UUID Generator Online - v1, v4, v5, v7 & Bulk Generate
Free online UUID/GUID generator. Generate UUID v1, v4, v5, v7 and Nil UUIDs. ...
Free Word Counter - Character & Text Analyzer
Free online word counter and text analyzer. Count words, characters, sentence...