What is a Unix Timestamp Converter?
A Unix timestamp is a numeric representation of time that counts the number of seconds elapsed since January 1, 1970 (UTC). It is widely used in programming, databases, and operating systems as a standardized time format.
The Unix Timestamp Converter helps you convert timestamps into human-readable dates, and vice versa. This makes it easier to understand logs, API responses, and system-generated time values.
Unix timestamps can be represented in seconds or milliseconds. Many programming languages and APIs rely on this format for storing and processing time-related data.
- Convert Unix timestamps to readable date and time formats
- Convert human dates back into Unix timestamps
- Support for both seconds and milliseconds formats
- Useful for debugging logs, APIs, and databases
- Compatible with multiple time zones and UTC
By using this converter, you can quickly switch between raw Unix values and standard date formats without manual calculation.
Epoch Time Cheatsheet
Get Current Epoch Time
PHP
time()
Python
import time; time.time()
JavaScript
Math.floor(new Date().getTime()/1000)
Java
System.currentTimeMillis()/1000
C#
DateTimeOffset.Now.ToUnixTimeSeconds()
Go
time.Now().Unix()
MySQL
SELECT unix_timestamp(now())
PostgreSQL
SELECT extract(epoch FROM now());
Linux Shell
date +%s
Convert from Date → Epoch
PHP
strtotime("15 November 2018")Python
calendar.timegm(time.strptime('2000-01-01 12:34:00','%Y-%m-%d %H:%M:%S'))JavaScript
new Date('2018-11-15').getTime()/1000SQL Server
DATEDIFF(s, '1970-01-01', timefield)
Unix Shell
date +%s -d"Jan 1, 1980 00:00:01"
Convert from Epoch → Date
PHP
date('r', epoch)Python
time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(epoch))Ruby
Time.at(epoch)
C#
new DateTime(1970,1,1).AddSeconds(epoch)
PostgreSQL
SELECT to_timestamp(epoch);
MySQL
FROM_UNIXTIME(epoch)
Linux Shell
date -d @1520000000
