Ttooleras
🕐

Unix Timestamp Converter

Converters

Convert between Unix timestamps (epoch) and human-readable dates. Free, private — all processing in your browser.

Current Unix Timestamp
Unix (seconds)0
Unix (milliseconds)0
ISO 8601
UTC
Local
Date only
Time only
RFC 2822
Advertisement

The Unix Timestamp Converter translates between Unix time (also called epoch time or POSIX time) and human-readable dates. Unix time counts seconds since January 1, 1970, 00:00:00 UTC — the "Unix epoch". This is the standard time format in databases, APIs, log files, file systems, and virtually every programming language. Paste a timestamp (seconds or milliseconds) to see it converted to any timezone and format, or enter a date to get the corresponding timestamp. Supports ISO 8601, RFC 3339, RFC 2822 formats, and any custom format you need. Handles both seconds (standard Unix) and milliseconds (JavaScript, Java System.currentTimeMillis).

Developers hit timestamp conversion problems constantly: API returns 1714521600 and you need to know what date that is; log file shows 2026-05-05T14:23:01Z and you need the epoch for a database query; Discord/X timestamps are in a unique format. This tool handles every variation instantly. All conversion is pure JavaScript math — no network calls, no timezone database lookups on servers. Your data stays on your device.

Unix Timestamp Converter — key features

Seconds and milliseconds

Auto-detect whether input is seconds (10 digits) or milliseconds (13 digits). Manually override if needed.

Current timestamp

One-click button shows the current Unix timestamp updating in real-time. Copy for immediate use.

All date formats

ISO 8601, RFC 3339, RFC 2822, HTTP date, SQL timestamp, custom — see the same moment in every format.

Timezone conversion

Display the timestamp in UTC, your local timezone, or any named IANA timezone (America/New_York, Asia/Tokyo, etc.).

Date to timestamp

Type or pick a date, get the Unix timestamp. Supports past dates (back to 1970) and future dates (up to Year 9999).

Relative time

Shows "2 hours ago" or "in 3 days" for any timestamp. Great for quick orientation.

Bulk conversion

Paste a list of timestamps (one per line), get all converted at once. Useful for log file analysis.

100% client-side

All conversion runs in your browser. No data uploaded, safe for server logs and internal data.

How to use the Unix Timestamp Converter

  1. 1

    Pick direction: timestamp → date or date → timestamp

    Use the first mode if you have a number like `1714521600`. Use the second if you have a date.

  2. 2

    Enter the value

    Paste or type. Auto-detection handles seconds vs milliseconds vs date formats. Correct manually if needed.

  3. 3

    Choose timezone

    UTC by default. Change to your local time or any IANA timezone for display.

  4. 4

    View all formats

    Every common format is shown simultaneously — ISO, RFC, SQL, Unix date. Copy whichever you need.

  5. 5

    See relative time

    Human-readable "2 hours ago" makes it easy to understand when the timestamp occurred.

  6. 6

    Copy and use

    Copy the desired format for your code, database query, or API call.

Common use cases for the Unix Timestamp Converter

API development

  • Debug API responses with timestamps: When an API returns `created_at: 1714521600`, convert instantly to see what date that is.
  • Construct JWT exp claims: JWT `exp` is a Unix timestamp. Calculate: now + 1 hour for a 1-hour expiring token.
  • Parse AWS S3 signed URLs: S3 signed URLs contain an expiration timestamp. Convert to check when the URL expires.
  • Rate limit X-RateLimit-Reset: HTTP headers often include a reset timestamp. Convert to know when your rate limit resets.

Database work

  • Query by timestamp: Write SQL queries against INTEGER timestamp columns: `WHERE created_at > 1714521600` for rows created after a specific date.
  • Convert stored timestamps: Many legacy databases store timestamps as integers. Convert to inspect records without running SQL conversion.
  • Time-range analysis: Convert dates to timestamps for range queries. `BETWEEN 1714521600 AND 1714608000` for specific 24-hour windows.

Log analysis

  • Understand log timestamps: Nginx, Apache, AWS CloudTrail logs use epoch time. Convert to local time while debugging.
  • Calculate event duration: Subtract two timestamps to get elapsed time. `end - start = duration in seconds`.
  • Audit log investigation: When investigating incidents, convert log timestamps to your timezone to match local events (meetings, deployments, etc.).

Development and testing

  • Create expiration timestamps: Need a token that expires in 1 hour? Now + 3600 seconds = 1 hour from now timestamp.
  • Mock data generation: Generate timestamps for test data: past events, future scheduled jobs, session creation times.
  • Migration scripts: When importing legacy data with date strings, convert to timestamps for consistency.

Unix Timestamp Converter — examples

Timestamp to date (UTC)

Classic conversion.

Input
1714521600
Output
UTC: 2024-05-01 00:00:00
ISO 8601: 2024-05-01T00:00:00Z
Relative: May 1, 2024 (1 year ago)

Milliseconds to date

JavaScript Date.now() value.

Input
1714521600000
Output
Detected: milliseconds
UTC: 2024-05-01 00:00:00
Local (EDT): 2024-04-30 20:00:00

Date to timestamp

ISO 8601 to Unix.

Input
2026-05-05T14:23:01Z
Output
Unix timestamp (seconds): 1762349381
Unix timestamp (milliseconds): 1762349381000

Current timestamp

Right now.

Input
Click "Now"
Output
Unix timestamp: 1714521900
Date: May 1, 2024, 12:05:00 AM UTC
Updates every second

Timezone display

Same timestamp, different timezones.

Input
1714521600 in multiple timezones
Output
UTC: 2024-05-01 00:00:00
America/New_York: 2024-04-30 20:00:00 (EDT)
Europe/London: 2024-05-01 01:00:00 (BST)
Asia/Tokyo: 2024-05-01 09:00:00 (JST)

Timestamp arithmetic

Calculate duration between two timestamps.

Input
Start: 1714521600 (May 1 00:00 UTC)
End: 1714525200 (May 1 01:00 UTC)
Output
Duration: 3600 seconds = 1 hour = 60 minutes

Future timestamp for JWT

Token expires in 1 hour.

Input
Now + 3600
Output
Current: 1714521600
+ 3600 seconds
= 1714525200 (1 hour from now)
Use as JWT exp claim

Technical details

Unix time counts seconds since January 1, 1970, 00:00:00 UTC — the "Unix epoch". This was chosen as the origin because Unix was designed in the late 1960s at Bell Labs.

Formats of Unix time:

- Seconds: 1714521600 — 10 digits for current dates. Standard Unix time.
- Milliseconds: 1714521600000 — 13 digits. JavaScript Date.now(), Java System.currentTimeMillis(), modern APIs.
- Microseconds: 1714521600000000 — 16 digits. Some scientific applications.
- Nanoseconds: 1714521600000000000 — 19 digits. High-precision timing, Go time.UnixNano().

The Year 2038 problem:

32-bit signed integers can hold max value 2^31 - 1 = 2147483647 seconds, equivalent to January 19, 2038, 03:14:07 UTC. After that, 32-bit systems overflow to negative numbers, interpreting the time as ~December 13, 1901. Many legacy systems and embedded devices still use 32-bit timestamps. Modern systems use 64-bit integers which won't overflow for billions of years.

Common date formats:

- ISO 8601 / RFC 3339: 2026-05-05T14:23:01Z (primary standard for APIs)
- RFC 2822: Tue, 05 May 2026 14:23:01 +0000 (email headers)
- HTTP Date (RFC 7231): Tue, 05 May 2026 14:23:01 GMT (HTTP headers)
- SQL timestamp: 2026-05-05 14:23:01 (most SQL databases)
- Unix date command: Tue May 5 14:23:01 UTC 2026
- JavaScript Date: Tue May 05 2026 14:23:01 GMT+0000

Timezone handling:

- UTC (Coordinated Universal Time) — the reference time. All servers, APIs, and databases should use UTC internally.
- Local time — your browser's timezone (based on OS settings).
- Timezone offset+00:00 (UTC), -05:00 (EST), +09:00 (JST), etc.
- Named timezones (IANA) — America/New_York, Europe/London, Asia/Tokyo. Handle daylight saving automatically.

Timestamp arithmetic:

Since Unix timestamps are just numbers, you can subtract them to get duration:

``
end - start = duration in seconds
1714525200 - 1714521600 = 3600 seconds = 1 hour
``

Special timestamps:

- 0 = 1970-01-01 00:00:00 UTC (Unix epoch)
- 1000000000 = 2001-09-09 01:46:40 UTC (the "billennium")
- 2147483647 = 2038-01-19 03:14:07 UTC (32-bit overflow)
- 10000000000 = 2286-11-20 17:46:40 UTC (first 11-digit timestamp)

Common problems and solutions

Confusing seconds and milliseconds

Timestamps with 10 digits are seconds (standard Unix). 13 digits are milliseconds (JavaScript, Java). Multiplying by 1000 or dividing by 1000 converts between them. Auto-detection usually works but verify for critical use.

Year 2038 problem

Unix timestamps stored as 32-bit signed integers overflow on January 19, 2038. Modern 64-bit systems don't have this issue. If your database or system still uses 32-bit timestamps, migrate before 2038 — or values will become negative.

Timezone ambiguity

A raw Unix timestamp is always UTC. The confusion comes from displaying it. Always specify timezone in your UI and logs. Storing timestamps in local timezones is a bad idea — use UTC everywhere.

Leap seconds

Unix time doesn't account for leap seconds. When a leap second is added, Unix time either repeats a second or smears it over time. For most applications, this is irrelevant. For astronomy or precise time synchronization, use TAI (International Atomic Time) instead.

Negative timestamps

Unix time before 1970 is negative. `-86400` means December 31, 1969 at 00:00:00 UTC. Most systems handle this but some legacy code may fail. If you're representing historical dates, use ISO 8601 strings.

Integer overflow in 32-bit languages

JavaScript numbers are 64-bit floats (safe up to 2^53). Integer math in 32-bit Python or C can overflow. Use 64-bit types or BigInt when doing timestamp arithmetic near the 2038 boundary.

DST and timezone changes

Converting Unix timestamps to local times requires current DST rules. The tool uses your browser's timezone database, which should be up-to-date. For historical dates near DST transitions, results may vary across tools.

Time-zone-less dates

A date string like "2026-05-05 14:23:01" without timezone is ambiguous. Is it UTC? Local? Some system default? Always include `Z` (for UTC) or an offset `+00:00` when storing or transmitting timestamps.

Unix Timestamp Converter — comparisons and alternatives

Unix time vs ISO 8601: Unix time is a single number — easy for databases, hard for humans. ISO 8601 is human-readable text — easy for humans, requires parsing for comparison. APIs typically use ISO 8601 in JSON for readability; internal code often uses Unix timestamps for performance.

Seconds vs milliseconds: Standard Unix uses seconds (Linux, most databases). JavaScript, Java, and some modern APIs use milliseconds. Both are common; just be consistent within your system.

Unix time vs NTP time: NTP (Network Time Protocol) counts from 1900 (not 1970) and uses a different format. Unix time is what operating systems and applications use; NTP is the protocol for synchronizing system clocks.

Unix time vs Windows FILETIME: Windows uses 100-nanosecond intervals since 1601. Completely different scale. Convert with: unix = (filetime - 116444736000000000) / 10000000.

Unix time vs DateTime objects: Most languages have DateTime types (Python datetime, Java Instant, JavaScript Date). These store internally as Unix time but provide parsing, formatting, and arithmetic. Use DateTime objects in application code; store as Unix timestamps in databases.

Unix time vs TAI (atomic time): TAI doesn't have leap seconds; Unix time has some leap second handling quirks. For scientific or precise time applications, TAI is better. For 99.9% of software, Unix time is fine.

Frequently asked questions about the Unix Timestamp Converter

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 (the "Unix epoch"). It's the standard way computers represent points in time. Example: 1714521600 represents May 1, 2024 at 00:00:00 UTC.

How do I convert a Unix timestamp to a date?

Divide by 86,400 (seconds per day) to get days since 1970, or use this tool for instant conversion. In code: JavaScript new Date(1714521600 * 1000), Python datetime.fromtimestamp(1714521600), Java Instant.ofEpochSecond(1714521600).

What is the difference between Unix seconds and milliseconds?

Standard Unix time is in seconds (10 digits for current dates). JavaScript Date.now(), Java System.currentTimeMillis(), and some modern APIs return milliseconds (13 digits). Multiply by 1000 to go from seconds to ms; divide by 1000 to go from ms to seconds.

Why 1970?

January 1, 1970 was chosen as the epoch when Unix was designed at Bell Labs in the late 1960s. It was a convenient round date near the system's development. Other systems use different epochs (NTP: 1900, Windows FILETIME: 1601, Mac HFS: 1904).

What is the Year 2038 problem?

Unix timestamps stored as 32-bit signed integers can hold max 2^31 - 1 = 2,147,483,647 seconds — this overflows on January 19, 2038 at 03:14:07 UTC. After that, 32-bit systems read the time as negative, interpreting as ~1901. Fixed by moving to 64-bit integers (most modern systems already use 64-bit).

Is Unix time in UTC?

Yes, always. Unix time is a single number measuring seconds since the Unix epoch in UTC. It has no timezone — the timezone is added only when displayed. Storing and transmitting Unix timestamps in non-UTC is an error that leads to bugs.

How do I get the current Unix timestamp?

In JavaScript: Math.floor(Date.now() / 1000) for seconds or Date.now() for milliseconds. In Python: int(time.time()). In shell: date +%s. In SQL: EXTRACT(EPOCH FROM NOW()). Or click "Now" in this tool for live value.

Can Unix timestamps be negative?

Yes. Negative values represent dates before January 1, 1970. For example, -86400 = December 31, 1969 at 00:00:00 UTC. Most systems handle negative timestamps correctly, but some legacy code may fail.

How precise is Unix time?

Standard Unix time is precise to 1 second. Extensions: milliseconds (0.001s), microseconds (0.000001s), nanoseconds (0.000000001s). For most applications, seconds or milliseconds are sufficient. High-frequency trading and scientific applications use nanoseconds.

What about leap seconds?

Unix time does NOT account for leap seconds. When a leap second is added (e.g., to keep Unix time aligned with astronomical time), systems either repeat a second (same timestamp for 2 real seconds) or "smear" it over time (slightly slow down for 24 hours). For most software this is irrelevant.

Additional resources

Advertisement

Related tools

All Converters

Learn more

Explore more tools

200+ free tools that run in your browser.

Browse all tools →