Unix Timestamp Converter
Convert Unix timestamps to readable dates and times — and back again. Free online epoch time converter for developers, database administrators, and system engineers.
Understanding Unix Timestamps
Unix timestamps represent time as the number of seconds elapsed since January 1, 1970, at 00:00:00 UTC. This epoch time system provides a universal way to store and manipulate dates across different systems and time zones.
Epoch Time Formula
Timestamp = (Current Date - Epoch Date) in seconds
Date = Epoch Date + (Timestamp seconds)
Epoch: January 1, 1970 00:00:00 UTC
Unix timestamps ignore leap seconds for simplicity. Most systems use 32-bit or 64-bit integers. The Year 2038 problem affects 32-bit systems when timestamps overflow on January 19, 2038.
Common Unix Timestamps Reference
| Date/Time | Unix Timestamp | Event |
|---|---|---|
| Jan 1, 1970 00:00:00 | 0 | Unix Epoch Start |
| Jan 1, 2000 00:00:00 | 946684800 | Y2K Millennium |
| Jan 1, 2020 00:00:00 | 1577836800 | Start of 2020 |
| Jan 1, 2025 00:00:00 | 1735689600 | Start of 2025 |
| Jan 19, 2038 03:14:07 | 2147483647 | 32-bit Overflow |
| Dec 31, 2099 23:59:59 | 4102444799 | End of 21st Century |
Conversion Examples
Example 1: Timestamp to Date
Timestamp: 1609459200
Calculation: 1609459200 seconds after Jan 1, 1970
Result: January 1, 2021 00:00:00 UTC
Example 2: Date to Timestamp
Date: July 4, 2024 12:00:00 UTC
Days from epoch: 19,908
Result: 1720094400
Example 3: Millisecond Timestamps
JavaScript uses milliseconds: 1704067200000
Convert to seconds: divide by 1000
Result: 1704067200 (January 1, 2024)
Example 4: Time Zone Adjustment
UTC Timestamp: 1704067200
EST (UTC-5): Same timestamp, displays as Dec 31, 2023 7:00 PM
JST (UTC+9): Same timestamp, displays as Jan 1, 2024 9:00 AM
Programming Language Examples
JavaScript
// Current timestamp (ms)
Date.now()
// Current timestamp (seconds)
Math.floor(Date.now() / 1000)
// Timestamp to date
new Date(1704067200 * 1000)
Python
import time
from datetime import datetime
# Current timestamp
time.time()
# Timestamp to date
datetime.fromtimestamp(1704067200)
PHP
// Current timestamp
time();
// Timestamp to date
date('Y-m-d H:i:s', 1704067200);
// Date to timestamp
strtotime('2024-01-01');
SQL
-- PostgreSQL
SELECT EXTRACT(EPOCH FROM NOW());
SELECT to_timestamp(1704067200);
-- MySQL
SELECT UNIX_TIMESTAMP();
SELECT FROM_UNIXTIME(1704067200);
Frequently Asked Questions
Why does Unix time start at 1970?
January 1, 1970 was chosen as the Unix epoch by early Unix developers at Bell Labs. The date provided a reasonable reference point that kept timestamp values manageable with limited computing resources of the era.
What is the Year 2038 problem?
32-bit signed integers overflow on January 19, 2038 at 03:14:07 UTC. Systems using 32-bit timestamps will incorrectly interpret subsequent timestamps as negative values. Migration to 64-bit timestamps solves this issue.
Do Unix timestamps include leap seconds?
Unix timestamps ignore leap seconds for simplicity. Each day is treated as exactly 86,400 seconds. This creates a small drift from UTC over decades but simplifies time calculations in most applications.
How do I convert Unix time to my local timezone?
Unix timestamps are always in UTC. Use your programming language's date formatting functions with timezone parameters. Most systems automatically convert to local time when displaying dates.
Other Free Tools
Time Duration Calculator
Calculate the exact duration between two times or add and subtract time intervals easily. Free online time duration calculator for work hours, project planning, and scheduling.
Age Calculator
Calculate your exact age in years, months, and days from your date of birth. Free online age calculator — also find the age on any past or future date.
Date Difference Calculator
Calculate the exact number of days, weeks, months, and years between any two dates. Free online date difference calculator for deadlines, anniversaries, and event planning.
Time Converter
Convert time units — seconds, minutes, hours, days, weeks, months, years. Simple online time converter for everyday and scientific use.
Frequency Converter
Convert frequency units — hertz, kilohertz, megahertz, gigahertz, RPM, and more. Free online frequency converter for electronics and audio engineering.
Video Frame Rate Converter
Convert video frame rates between 24fps, 30fps, 60fps, 120fps, and more. Calculate total frames for any video duration. Free online frame rate converter for video editors and filmmakers.
Audio Bitrate Converter
Convert audio bitrate units and calculate file size from bitrate and duration. Free online audio bitrate converter for music production, podcasting, and streaming optimization.
Data Storage Converter
Convert digital storage units — bytes, KB, MB, GB, TB, and more. Free online data storage converter for computing and IT professionals.
Length Converter
Convert length units instantly — meters, feet, inches, kilometers, miles, yards, and more. Free online length converter for everyday and scientific use.
Weight and Mass Converter
Convert weight and mass units — kilograms, pounds, grams, ounces, tons, and more. Accurate online weight converter for cooking, shipping, and science.
Volume Converter
Convert volume units — liters, gallons, milliliters, cubic feet, fluid ounces, and more. Free online volume converter for cooking and engineering.
Area Converter
Convert area units — square meters, acres, hectares, square feet, square kilometers, and more. Ideal for real estate and construction.
Acceleration Converter
Convert acceleration units — m/s², g-force, ft/s², Gal, and more. Accurate online converter for physics, aerospace, and mechanical engineering.
Speed Converter
Convert speed units — km/h, mph, m/s, knots, and more. Free online speed converter for travel, sports, physics, and engineering.
Angle Converter
Convert angle units — degrees, radians, gradians, arcminutes, arcseconds, and more. Accurate online angle converter for geometry and engineering.
Image DPI Converter
Convert image DPI and calculate print size from pixel dimensions. Free online image DPI converter for photographers, designers, and print-ready file preparation.
Digital Image Resolution Converter
Convert digital image resolution units — DPI, PPI, dots/cm, pixels/mm, and more. Free online resolution converter for photography and printing.
Electric Potential Converter
Convert electric potential and voltage units — volts, millivolts, kilovolts, megavolts, and more. Free online voltage converter for electronics and power systems.
Electric Resistance Converter
Convert electric resistance units — ohms, kilohms, megaohms, milliohms, and more. Free online resistance converter for circuit design and electronics.
Capacitance Converter
Convert capacitance units — farads, microfarads, nanofarads, picofarads, and more. Free online capacitance converter for electronics and circuit design.
Inductance Converter
Convert inductance units — henries, millihenries, microhenries, nanohenries, and more. Free online inductance converter for electronics and RF engineering.
Frequency to Musical Note Converter
Convert any frequency in Hz to its corresponding musical note and octave — and back again. Free online pitch frequency converter for musicians, audio engineers, and music theory students.
Sound Pressure Converter — Pa to dB
Convert sound pressure between pascals and decibels (dB SPL) instantly. Free online sound pressure converter for acoustics, audio engineering, and noise measurement.
Luminance Converter
Convert luminance units — cd/m² (nits), foot-lamberts, stilb, and more. Free online luminance converter for display technology and photography.
Luminous Intensity Converter
Convert luminous intensity units — candela, millicandela, candlepower, and more. Accurate online converter for photometry and LED design.
Illuminance Converter
Convert illuminance units — lux, foot-candles, phot, nox, and more. Free online illumination converter for lighting design and photography.
Density Converter
Convert density units — kg/m³, g/cm³, lb/ft³, lb/in³, and more. Free online density converter for material science, chemistry, and engineering.
Surface Tension Converter
Convert surface tension units — N/m, mN/m, dyne/cm, lbf/ft, and more. Free online converter for chemistry and materials science.
Linear Current Density Converter
Convert linear current density units — A/m, mA/cm, kA/m, and more. Free online converter for electromagnetics and electrical engineering.
Electric Field Strength Converter
Convert electric field strength units — V/m, kV/m, N/C, and more. Free online electric field converter for electrostatics and antenna design.