Unix Timestamp Converter

Convert epoch timestamps to human-readable dates and back. Live counter, timezone support, and instant copy.

Current Unix Timestamp1,775,195,627
Timestamp → Date
Enter a Unix timestamp above
Date → Timestamp
Pick a date and time above

What Is a Unix Timestamp?

A Unix timestamp (or epoch time) counts the number of seconds since January 1, 1970 00:00:00 UTC - a moment known as the Unix epoch. This convention was chosen when Unix was created in the early 1970s, and it became the de facto standard for representing time in computing. Every operating system, database, and programming language understands epoch time. The value is always relative to UTC, making it timezone-independent: the same integer maps to the same instant everywhere on Earth. One common source of confusion is seconds vs milliseconds - most Unix systems use 10-digit second timestamps, while JavaScript and Java use 13-digit millisecond timestamps. This tool auto-detects which you entered. A related concern is the Year 2038 problem: 32-bit signed integers overflow on January 19, 2038. Modern 64-bit systems are unaffected, but legacy embedded devices may need updates.

Convert Unix Timestamps in Code

Here are copy-paste snippets for converting timestamps in popular languages. Remember: JavaScript and Java use milliseconds, while most other languages use seconds.

# To date
datetime.fromtimestamp(ts, tz=timezone.utc)
# To epoch
int(time.time())
// To date (seconds input)
new Date(ts * 1000)
// To epoch
Math.floor(Date.now() / 1000)
-- MySQL: To date
FROM_UNIXTIME(ts)
-- MySQL: To epoch
UNIX_TIMESTAMP()
-- PostgreSQL: TO_TIMESTAMP(ts)
// To date
date('Y-m-d H:i:s', $ts)
// To epoch
time()
// To date
Instant.ofEpochSecond(ts)
// To epoch
Instant.now().getEpochSecond()
// To date
DateTimeOffset.FromUnixTimeSeconds(ts)
// To epoch
DateTimeOffset.UtcNow.ToUnixTimeSeconds()
# To date (GNU Linux)
date -d @$ts
# To date (macOS)
date -r $ts
# To epoch
date +%s
// To date
time.Unix(ts, 0)
// To epoch
time.Now().Unix()

Convert Unix Timestamps in Spreadsheets

Working with epoch timestamps in spreadsheets is common when exporting data from databases or APIs. Watch out for the seconds vs milliseconds gotcha - if your timestamps have 13 digits, divide by 1000 first.

  • Excel: Formula: =(A1/86400)+DATE(1970,1,1). Format the cell as Date/Time. For milliseconds, use =(A1/86400000)+DATE(1970,1,1).
  • Google Sheets: Same formula as Excel. Newer versions also support =EPOCHTODATE(A1) for seconds and =EPOCHTODATE(A1,2) for milliseconds.
  • BigQuery: TIMESTAMP_SECONDS(ts) for 10-digit timestamps. TIMESTAMP_MILLIS(ts) for 13-digit. TIMESTAMP_MICROS(ts) for 16-digit.
  • Snowflake: TO_TIMESTAMP(ts) for seconds. TO_TIMESTAMP(ts, 3) for milliseconds. The second parameter specifies the scale.

How to Use This Tool

  • View Current Timestamp: View the current Unix timestamp at the top of the page - it updates every second.
  • Convert Timestamp to Date: Paste or type a timestamp in the left panel. The tool auto-detects whether it is seconds or milliseconds.
  • Convert Date to Timestamp: Use the date picker in the right panel to convert a date to a Unix timestamp.
  • Change Timezone: Use the timezone dropdown to see dates in any timezone.
  • Copy Output: Click the copy icon next to any output to copy it to your clipboard instantly.

Date Format Standards: RFC 2822 and ISO 8601

When converting Unix timestamps to human-readable dates, two industry-standard formats are commonly used. Understanding when and where each is used helps ensure your data integrates smoothly with other systems.

  • ISO 8601: The international standard format: 2024-01-15T14:30:45.123+0800. Used in APIs, JSON responses, logging systems, and databases. Sortable as a string, timezone-aware, and unambiguous across regions.
  • RFC 2822: Email and HTTP header format: Mon, 15 Jan 2024 14:30:45 +0800. Used in email timestamps (Date header), HTTP headers (Last-Modified, Date), and some legacy systems. Human-readable but less suitable for automation.
  • When to Use Each: Use ISO 8601 for APIs, databases, and logs - it sorts correctly and parses reliably. Use RFC 2822 when sending emails or working with HTTP headers. Most modern systems default to ISO 8601.

Who Uses This Tool

  • Backend Developers: Debugging API responses, database records, and log entries that store timestamps as integers. Quickly verify that a stored epoch value maps to the expected date.
  • Data Engineers: Converting epoch columns during ETL pipelines, data migrations, and transformations in BigQuery, Snowflake, or Spark. Validating that timestamp conversions produce correct results.
  • DevOps / SRE: Correlating log timestamps across systems that use different timezone conventions. Converting alert timestamps to local time during incident response.

Frequently Asked Questions

What is a Unix timestamp?
A Unix timestamp (also called epoch time or POSIX time) is the number of seconds since January 1, 1970 00:00:00 UTC. It is timezone-independent and widely used in computing for storing and transmitting time data.
What is the difference between seconds and milliseconds timestamps?
A 10-digit timestamp counts seconds since epoch (used by Unix/Linux, PHP, Python). A 13-digit timestamp counts milliseconds (used by JavaScript, Java). This tool auto-detects which format you entered based on the number of digits.
What is the Y2K38 problem?
32-bit signed integers overflow on January 19, 2038 at 03:14:07 UTC (value 2,147,483,647). After that, the counter wraps to a negative number. Modern systems use 64-bit integers which won't overflow for billions of years.
Are Unix timestamps always in UTC?
Yes. The epoch value itself is always UTC - it represents one unambiguous moment in time. When you display it as a human-readable date, you apply a timezone offset to get the local representation.
What is the maximum Unix timestamp?
For 32-bit systems: 2,147,483,647 (Jan 19, 2038). For 64-bit systems: 9,223,372,036,854,775,807 - effectively unlimited. JavaScript can handle timestamps up to ±8,640,000,000,000,000 milliseconds (about ±273,000 years from epoch).
Is my data private when using this tool?
Completely. All conversions happen in your browser using JavaScript. No data is sent to any server, stored, or logged. Open DevTools Network tab to verify - you'll see zero outbound requests when converting.

Send Feedback

Password Generator
Generate strong, secure passwords with custom length and character options.
Word Counter
Count words, characters, sentences, and estimate reading time.
Username Generator
Generate unique usernames with style options and bulk generation.
Markdown to PDF
Convert Markdown to a clean, printable PDF. No installs required.
Unix Timestamp Converter
Convert Unix timestamps to human-readable dates and back. See the current epoch time live, with timezone support.
Deep Link Tester
Test and debug deep links, Universal Links (iOS), and App Links (Android) directly in your browser.
AI Token Calculator
Paste any text and instantly see token count, context usage, and estimated cost for GPT, Claude & Gemini models.
URL Slug GeneratorSoon
Convert any title into a clean, SEO-friendly URL slug.