WebToolsPlanet
developer Tools

Unix Timestamp Converter

Convert Unix epoch timestamps to human-readable dates and vice versa — with timezone support.

Last updated: March 25, 2026

Client-Side Processing
Input Data Stays on Device
Instant Local Execution

Find this tool useful? Support the project to keep it free!

Buy me a coffee

What is Unix Timestamp Converter?

A Unix timestamp (also called epoch time, POSIX time, or Unix time) is a system for representing time as a single integer — the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC (called "the Unix epoch"). For example, 1711324800 represents March 25, 2024 at 00:00:00 UTC. This simple format is used universally in programming, databases, API responses, log files, and file systems because it is unambiguous, timezone-independent, easy to compare, and trivial to do arithmetic on.

When working with APIs, databases (PostgreSQL, MongoDB), distributed systems, and server logs, you constantly encounter Unix timestamps that need to be decoded into human-readable dates for debugging — or dates that need to be encoded as timestamps for queries. JavaScript's Date.now() returns milliseconds (13 digits); most Unix tools use seconds (10 digits). This tool handles both and shows the timestamp in UTC, your local timezone, and relative human-friendly form ("3 hours ago").

How to Use Unix Timestamp Converter

1

To convert a timestamp to a date: paste a Unix timestamp (10-digit seconds or 13-digit milliseconds) in the timestamp field

2

The corresponding UTC date, local timezone date, and relative time appear instantly

3

To convert a date to a timestamp: click the "Date to Timestamp" tab and type or pick a date/time

4

Use the timezone selector to see the timestamp in any specific timezone

5

Click "To Now" to instantly populate the current timestamp for reference

Common Use Cases

  • Decoding API response timestamps (created_at, updated_at) from JSON for debugging
  • Converting database query results with timestamp columns into readable dates
  • Debugging JWT tokens — decode the exp and iat fields to see expiry and issue times
  • Calculating the Unix timestamp for a specific date to use in a WHERE clause query
  • Converting Stripe webhook event.created timestamps to confirm event timing
  • Decoding server log timestamps to correlate events across distributed systems
  • Checking when a file was last modified using the mtime Unix timestamp from stat()
  • Validating OAuth 2.0 token expiry (expires_in seconds added to token issue time)

Example Input and Output

Converting timestamps found in a typical REST API response:

Timestamps from an API response
Seconds (10 digits):    1711324800
Milliseconds (13 digits): 1711324800000
JWT exp field:          1711411200
Human-readable date values
1711324800
→ UTC: Mon, 25 Mar 2024 00:00:00 UTC
→ Local (IST): Mon, 25 Mar 2024 05:30:00 IST
→ Relative: 1 day ago

1711324800000 (milliseconds — JavaScript Date.now())
→ Same date (÷ 1000 = 1711324800)

1711411200 (JWT exp)
→ UTC: Tue, 26 Mar 2024 00:00:00 UTC
→ Token valid for: 24 hours after issue

Client-Side Processing

All timestamp conversions run locally using the browser's built-in JavaScript Date API. No timestamps or dates are sent to our servers.

API Debugging Tip

When debugging a JWT token's expiry, decode the base64 payload (middle segment) and paste the "exp" field value here. Compare it to "To Now" to instantly see whether the token has expired and by how much.

Milliseconds Alert

A very common developer mistake: using a JavaScript millisecond timestamp (13 digits) in an API or database that expects Unix seconds (10 digits). If a date shows as "year 56000" or similar, divide by 1000. This tool auto-detects the format and warns if you may have mixed them up.

Frequently Asked Questions

What is the difference between Unix timestamp seconds and milliseconds?
Most Unix tools and server-side languages (Python, C, PHP date functions) use seconds (10 digits). JavaScript's Date.now() and Date.getTime() return milliseconds (13 digits — 1000x larger). This tool auto-detects which format you pasted based on the number of digits. If you paste a 13-digit number it treats it as milliseconds and divides by 1000 internally.
What timezone does Unix epoch time use?
Unix timestamps are always UTC — they represent seconds since 1970-01-01 00:00:00 UTC regardless of any timezone. Converting to a local time is purely a display operation — the underlying number is the same worldwide. This makes timestamps ideal for distributed systems where different servers may run in different timezones.
How do I get the current Unix timestamp in various languages?
JavaScript: Math.floor(Date.now() / 1000) or Date.now() for ms. Python: import time; int(time.time()). PHP: time(). Go: time.Now().Unix(). Unix shell: date +%s. SQL (PostgreSQL): EXTRACT(EPOCH FROM NOW()). MySQL: UNIX_TIMESTAMP().
What is the maximum Unix timestamp (Year 2038 problem)?
On 32-bit systems using signed 32-bit integers, the maximum Unix timestamp is 2,147,483,647 — which represents January 19, 2038 at 03:14:07 UTC. After that, the counter overflows to a negative number. Modern 64-bit systems can represent timestamps up to year 292 billion. All modern servers and databases use 64-bit timestamps — the Year 2038 problem is only a concern for very old embedded systems.
How do I convert a Unix timestamp to a JavaScript Date object?
new Date(timestamp * 1000) — multiply by 1000 because JavaScript Date expects milliseconds. To get a Unix timestamp from a Date: Math.floor(date.getTime() / 1000). For timezone-aware formatting, use Intl.DateTimeFormat with the timeZone option, or a library like date-fns or Luxon.
What is the difference between epoch time and ISO 8601?
Unix epoch time is a simple integer (1711324800) — machine-friendly, timezone-neutral, easy to compare and sort. ISO 8601 is a human-readable string format (2024-03-25T00:00:00Z) — unambiguous for humans, includes timezone info explicitly. APIs typically accept and return ISO 8601 strings in JSON, while databases and log files often store Unix timestamps internally for efficiency.

How This Tool Works

The input is parsed and the digit count checked (10 digits = seconds, 13 digits = milliseconds). The parsed value is passed to JavaScript's Date constructor (after ×1000 if seconds) to create a Date object. Multiple formatted representations are then derived using Intl.DateTimeFormat with different timezone and locale settings: UTC, local system timezone, and a relative formatter using Intl.RelativeTimeFormat. The reverse direction (date string to timestamp) uses Date.parse() or a manual date picker input.

Technical Stack

JavaScript Date APIIntl.DateTimeFormatIntl.RelativeTimeFormatClient-side onlyNo external libraries