Texterfly

Unix Timestamp Converter

Convert epoch time to human-readable dates and back. Auto-detects seconds, milliseconds, microseconds, and nanoseconds. All timezones, batch mode, and code examples in 10 languages.

Auto-detect s/ms/μs/nsAll IANA TimezonesBatch ConversionDate → TimestampStart/End of DayCode Examples100% Free
Current Unix Timestamp

Seconds to Human Duration

Start/End of Period Timestamps

Notable Unix Timestamps

Unix Epoch (start of time)0
Y2K (Jan 1, 2000)946684800
Unix time 1,000,000,0001000000000
Unix time 1,111,111,1111111111111
Unix time 1,234,567,8901234567890
Unix time 1,500,000,0001500000000
Unix time 2,000,000,0002000000000
Year 2038 Problem (int32 max)2147483647
Unix time 3,000,000,0003000000000

What Is a Unix Timestamp?

A Unix timestamp (also called epoch time, POSIX time, or Unix time) is the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC — the "Unix Epoch." It is the universal standard for representing moments in time in computing — a single integer that is identical everywhere in the world, regardless of timezone or locale.

# Unix timestamps by precision

1718035200 → 2024-06-10 12:00:00 UTC (10 digits = seconds)

1718035200000 → 2024-06-10 12:00:00 UTC (13 digits = milliseconds)

1718035200000000 → 2024-06-10 12:00:00 UTC (16 digits = microseconds)

1718035200000000000 → 2024-06-10 12:00:00 UTC (19 digits = nanoseconds)

🌍

Timezone-independent

The same timestamp represents the same moment everywhere. New York and Tokyo read 1718035200 as exactly the same instant — only the clock display differs.

Auto-detection

Paste any timestamp and the tool detects whether it's seconds, milliseconds, microseconds, or nanoseconds based on digit count — no manual selection needed.

📦

Batch conversion

Convert dozens of timestamps at once — paste them separated by newlines, commas, or semicolons. Results appear with individual copy buttons.

Timestamp Conversion Code — 10 Languages

Copy-paste snippets for the most common programming languages.

JavaScript / Node.js
// Current timestamp (seconds)
const ts = Math.floor(Date.now() / 1000);

// Timestamp → Date object
const date = new Date(1718035200 * 1000);
console.log(date.toISOString()); // "2024-06-10T12:00:00.000Z"

// Date → timestamp (seconds)
const ts2 = Math.floor(new Date('2024-06-10T12:00:00Z').getTime() / 1000);
Python
import datetime, time

# Current timestamp (seconds)
ts = int(time.time())

# Timestamp → datetime
dt = datetime.datetime.utcfromtimestamp(1718035200)
print(dt.isoformat())  # "2024-06-10T12:00:00"

# datetime → timestamp (seconds)
ts2 = int(datetime.datetime(2024, 6, 10, 12, 0, 0,
          tzinfo=datetime.timezone.utc).timestamp())
PHP
<?php
// Current timestamp
$ts = time();

// Timestamp → date string
echo date('Y-m-d H:i:s', 1718035200);
// → "2024-06-10 12:00:00"

// Date string → timestamp
$ts2 = strtotime('2024-06-10 12:00:00');
MySQL / MariaDB
-- Timestamp → datetime
SELECT FROM_UNIXTIME(1718035200);
-- → "2024-06-10 12:00:00"

-- datetime → timestamp
SELECT UNIX_TIMESTAMP('2024-06-10 12:00:00');

-- Current epoch
SELECT UNIX_TIMESTAMP();
PostgreSQL
-- Timestamp → timestamptz
SELECT to_timestamp(1718035200);
-- → "2024-06-10 12:00:00+00"

-- timestamptz → epoch (seconds)
SELECT EXTRACT(EPOCH FROM NOW())::bigint;

-- Current epoch
SELECT FLOOR(EXTRACT(EPOCH FROM NOW()));
Java
import java.time.Instant;

// Timestamp → Instant
Instant instant = Instant.ofEpochSecond(1718035200L);
System.out.println(instant); // 2024-06-10T12:00:00Z

// Instant → timestamp (seconds)
long ts = Instant.now().getEpochSecond();
Go
import "time"

// Timestamp → time.Time
t := time.Unix(1718035200, 0).UTC()
fmt.Println(t.Format(time.RFC3339))
// → "2024-06-10T12:00:00Z"

// time.Time → timestamp (seconds)
ts := time.Now().Unix()
Rust
use std::time::{SystemTime, UNIX_EPOCH};

// Current timestamp (seconds)
let ts = SystemTime::now()
    .duration_since(UNIX_EPOCH)
    .unwrap()
    .as_secs();

// With chrono crate:
// let dt = Utc.timestamp_opt(1718035200, 0).unwrap();
C# / .NET
using System;

// Timestamp → DateTime
var dt = DateTimeOffset.FromUnixTimeSeconds(1718035200).UtcDateTime;
Console.WriteLine(dt.ToString("o"));
// → "2024-06-10T12:00:00.0000000Z"

// DateTime → timestamp (seconds)
long ts = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
Ruby
require 'time'

# Timestamp → Time
t = Time.at(1718035200).utc
puts t.iso8601
# → "2024-06-10T12:00:00Z"

# Time → timestamp (seconds)
ts = Time.now.to_i

How Time Zones Affect Timestamp Display

Timestamp 0 (the Unix Epoch) displayed across major timezones:

TimezoneOffsetTimestamp 0 displays as
UTCUTC+01970-01-01 00:00:00
America/New_YorkUTC−5 (EST)1969-12-31 19:00:00
America/Los_AngelesUTC−8 (PST)1969-12-31 16:00:00
Europe/LondonUTC+0 (GMT)1970-01-01 00:00:00
Europe/ParisUTC+1 (CET)1970-01-01 01:00:00
Asia/TokyoUTC+9 (JST)1970-01-01 09:00:00
Asia/KolkataUTC+5:30 (IST)1970-01-01 05:30:00
Australia/SydneyUTC+10 (AEST)1970-01-01 10:00:00
Africa/CairoUTC+2 (EET)1970-01-01 02:00:00

Frequently Asked Questions

What is a Unix timestamp?
A Unix timestamp is the number of seconds elapsed since January 1, 1970, 00:00:00 UTC (the "Unix Epoch"). It is the universal standard for representing time in computing — a single integer that is the same everywhere in the world, regardless of timezone.
How do I convert a Unix timestamp to a human-readable date?
Paste the timestamp into the Timestamps field. Select "Auto-detect" for the unit, pick a timezone, and click Convert. The tool shows the date in your chosen format alongside an ISO 8601 version.
How do I know if my timestamp is seconds or milliseconds?
Count the digits: 10 digits = seconds, 13 digits = milliseconds, 16 digits = microseconds, 19 digits = nanoseconds. The Auto-detect option identifies the unit automatically and shows which one it used.
What is the Year 2038 Problem?
Systems storing Unix timestamps as a signed 32-bit integer have a maximum value of 2,147,483,647 (2038-01-19 03:14:07 UTC). One second after that the value overflows to a negative number. The fix is to use 64-bit integers for all timestamp storage.
Can I convert multiple timestamps at once?
Yes — paste multiple timestamps separated by newlines, commas, or semicolons. The tool converts all of them and shows individual results with copy buttons.
How do time zones affect conversion?
The timestamp itself is universal and timezone-independent. The timezone only affects display: timestamp 0 is midnight UTC, but 7 PM on Dec 31, 1969 in New York (UTC−5). Use the timezone selector to see any moment in any local time.
What is the difference between epoch and Unix time?
"Epoch time", "Unix time", "POSIX time", and "Unix timestamp" all mean the same thing: the count of seconds since January 1, 1970, 00:00:00 UTC.
What date output formats are supported?
ISO 8601 (2024-06-10T12:00:00.000Z), RFC 2822 (Mon, 10 Jun 2024 12:00:00 GMT), and a locale-specific string that adapts to your browser language.

Explore All Tools

82 free tools — no signup required

All 82 tools are free · No signup · No ads