--:--:-- ----years--months--days seconds 0Click to copyCopied! milliseconds 0Click to copyCopied!
Timestamp to date

Conversion result

-- Click to copy Copied!
-- Click to copy Copied!
-- Click to copy Copied!
-- Click to copy Copied!
Date to timestamp

Conversion result

-- Click to copy Copied!
-- Click to copy Copied!
-- Click to copy Copied!
-- Click to copy Copied!
batch timestamp extraction
Paste data to extract a timeline
Supports JSON, YAML, XML, and text. Automatically detects timestamp fields and displays them sorted by time.

Unix Timestamp Converter - Batch Extraction and Timeline Visualization

This Unix timestamp converter is an essential developer tool for converting between Unix timestamps and readable date-time values. It also provides powerfulbatch timestamp extractionthat automatically detects timestamps in JSON, YAML, XML, and log text, builds a visual timeline, and shows intervals between events. It also includes live timestamp display, 50+ global time zones, second/millisecond/microsecond precision, ISO 8601 output, and conversion history.

Key features

🕐 Live timestamp display

The top panel shows the current Unix timestamp in seconds and milliseconds. Switch across 50+ major time zones and copy the timestamp with one click.

  • Live Unix timestamp in seconds and milliseconds
  • Supports 10-digit seconds and 13-digit milliseconds
  • 50+Live display across global time zones
  • Click a timestamp to copy it

🔄 Timestamp to date and time

Enter a Unix timestamp and convert it to a readable date-time. Seconds (10 digits), milliseconds (13 digits), and microseconds (16 digits) are detected automatically.

Conversion example:
Input: 1640995200
Output: 2022-01-01 00:00:00 (Local time)
Output: 2021-12-31 16:00:00 UTC
Output: 2021-12-31T16:00:00.000Z (ISO 8601)
Output: 2years ago (Relative time)

⏰ Date and time to timestamp

Select or enter a date-time and convert it to a Unix timestamp. Use the date picker, type a date string, switch time zones, and export multiple precisions and formats.

Conversion example:
Input: 2024-01-01 12:00:00
Output: 1704096000 (seconds)
Output: 1704096000000 (milliseconds)
Output: 1704096000000000 (microseconds)
Output: 0x65931400 (Hex)

📊 Batch timestamp extraction and timeline

Automatically extract timestamps from JSON, YAML, XML, or log text and build a visual timeline. Seconds, milliseconds, and microseconds are detected automatically, making event intervals easier to inspect.

  • Supports JSON, YAML, XML, and plain-text logs
  • Recursively scans data structures and detects numeric timestamps
  • Visual timeline with automatic intervals between adjacent events
  • Sort by field order or timestamp value
  • Manually reorder or remove timeline nodes
  • Log mode matches ISO 8601, common date formats, and numeric timestamps automatically

🌍 Global time zone support

Supports 50+ major city time zones across Asia, Europe, the Americas, Oceania, and Africa. FollowsIANA time zone databasestandard,and handles daylight saving time (DST) automatically.

  • 50+Major city time zones such as Beijing, New York, London, and Tokyo
  • Automatic daylight saving time (DST) handling
  • UTCStandard time support
  • Local time zone auto-detection

Single timestamp conversion steps

1

Choose conversion direction

Left side"Timestamp to date":InputUnixenter a timestamp to get a date-time
Right side"Date to timestamp":enter a date-time to get a Unix timestamp

2

Enter time data

Timestamp conversion: enter a 10-digit second, 13-digit millisecond, or 16-digit microsecond timestamp; unit detection is automatic
Date conversion: click the input to pick a date-time, or type a date string directly

3

View conversion result

Click"Convert"to view the result. All results can be clicked to copy, and conversion history is saved automatically.

Batch timestamp extraction steps

1

Choose data format

Choose JSON, YAML, XML, or plain text/log mode in the batch extraction area. You can also choose"Auto"let the tool detect the format automatically

2

Paste data

Paste data that contains timestamps into the left input area. The tool recursively scans the structure and extracts valid numeric timestamps in seconds, milliseconds, or microseconds.

3

View timeline

The right panel builds a visual timeline for extracted timestamps and their adjacent intervals. You can switch sorting, reorder nodes manually, or remove nodes.

What is a Unix timestamp?

Unix timestamp(Unix Timestamp),also calledEpoch timestamporPOSIX timestamp,is a time representation defined as the number of seconds since1970years1months1days00:00:00 UTC. This point in time is called theUnixUnix Epoch。UnixTimestamps are one of the most common time representations in computer systems, databases, logs, programming languages, and network protocols.

Why use Unix timestamps?

  • Unified standard:A global time representation that is independent of local time zones and geography
  • Easy calculation:Numeric values are easy to subtract, sort, and compare without complex date parsing
  • Storage efficient:stored as one integer,compared with"2024-01-01 12:00:00"strings, it saves a lot of space
  • Cross-platform compatibility:Supported natively by major operating systems and programming languages
  • Precise and reliable:Seconds are the base unit, with milliseconds and microseconds available for higher precision.

Timestamp precision types

Second timestamp (10 digits)

1704096000

Most common:LinuxDefault format in Unix systems, PHP, and Python

Millisecond timestamp (13 digits)

1704096000000

WebApplication:JavaScript、Java、C#Common format

Microsecond timestamp (16 digits)

1704096000000000

High precision:Performance monitoring and high-frequency trading systems

Nanosecond timestamp (19 digits)

1704096000000000000

Ultra-high precision:Scientific computing and real-time systems

Common use cases

🖥️ System logs and monitoring

Time markers for server logs, application logs, error tracking, and performance monitoring

🗄️ Database time fields

MySQL、PostgreSQL、MongoDBstores created and updated times

🌐 APIData exchange

RESTful API、WebSocketpasses time parameters and response data

🔐 Session and token management

JWTToken expiration, session timeout, and cookie lifetime

Important time milestones

UnixEpoch start

0

1970-01-01 00:00:00 UTC

Y2K38issue

2147483647

2038-01-19 03:14:07 UTC
32timestamp limit on 32-bit systems

Current timestamp

--

Updating live...

ISO 8601 Time format standards

ISO 8601is the date and time representation standard from ISO. It provides an unambiguous international date-time format for APIs, data exchange, configuration files, and global applications. This tool outputs standard ISO 8601 values.

ISO 8601 Core formats

Full date-time (most common)

2024-01-01T12:30:45Z - UTCTime (Zmeans UTC)
2024-01-01T12:30:45+08:00 - With time zone offset
2024-01-01T12:30:45.123Z - Includes milliseconds

Time zone notation

Z - UTCTime(UTC),recommended
+08:00 - UTC+8 (China Standard Time)
-05:00 - UTC-5 (US Eastern Standard Time)
+05:30 - Half-hour offset (India Standard Time)

Date formats

2024-01-01 - Full date
2024-01 - Year and month
2024-W01 - Year and week

Time formats

12:30:45 - Hour, minute, second
12:30:45.123 - Includes milliseconds
12:30 - Hour and minute

Time format comparison

Format type Example Pros Use case
ISO 8601 2024-01-01T12:30:45Z International standard, unambiguous, supports time zones APIAPIs, data exchange, logs
Unix timestamp 1704096000 Easy calculation,Storage efficient Databases and low-level systems
US format 01/01/2024 Readable US domestic applications
Chinese format 2024years1months1days Common in Chinese interfaces Chinese interface display

ISO 8601 support in programming languages

JavaScript

// Generate ISO 8601 format
new Date().toISOString()
// "2024-01-01T12:30:45.123Z"

// ParseISO 8601Format
new Date("2024-01-01T12:30:45Z")

Python

# Generate ISO 8601 format
from datetime import datetime
datetime.now().isoformat()
# "2024-01-01T12:30:45.123456"

# ParseISO 8601Format
datetime.fromisoformat("2024-01-01T12:30:45")

Java

// Generate ISO 8601 format
Instant.now().toString()
// "2024-01-01T12:30:45.123Z"

// ParseISO 8601Format
Instant.parse("2024-01-01T12:30:45Z")

Time zone and DST notes

Time zone(Time Zone)divides the earth into 24 longitudinal regions, with a one-hour difference between adjacent zones.DST(Daylight Saving Time, DST)is a practice used in some countries and regions that shifts clocks forward by one hour in summer. This tool supports50+major global time zones, handles DST automatically, and followsIANA time zone databasestandard。

Common time zone reference

UTC (Coordinated Universal Time)

Offset:+00:00
Description:International standard time, recommended for storage
No DST

CST (China Standard Time)

Offset:+08:00
City:Beijing、Shanghai、Hong Kong
No DST

EST/EDT (US Eastern Time)

Offset:-05:00 / -04:00 (DST)
City:New York、Washington
Uses DST

PST/PDT (US Pacific Time)

Offset:-08:00 / -07:00 (DST)
City:Los Angeles、San Francisco
Uses DST

JST (Japan Standard Time)

Offset:+09:00
City:Tokyo
No DST

GMT/BST (UK Time)

Offset:+00:00 / +01:00 (DST)
City:London
Uses DST

Daylight saving time (DST)

🔄 What is daylight saving time?

  • Spring change:3second Sunday in March at 2:00 AM, clocks move forward one hour
  • Autumn change:11first Sunday in November at 2:00 AM, clocks move back one hour
  • Affected regions:United States、Canada、most European countries
  • No DST:China、Japan、India and many Asian countries

💻 How should developers handle time zones?

  • Data storage:Use UTC timestamps on servers and in databases
  • Frontend display:convert based on the user browser time zone
  • APIAPI:Use ISO 8601 with an explicit time zone when exchanging times
  • Time zone conversion:use this tool or a time zone library in your language

Time zone best practices

✅ Recommended practice

  • Store UTC timestamps consistently on the backend
  • Render local time on the frontend based on the user time zone
  • Use ISO 8601 in APIs, for example 2024-01-01T12:30:45Z
  • Store user time zone preferences

❌ Avoid

  • Do not store server-local time
  • Do not transfer time without time zone information
  • Avoid critical operations during DST transitions
  • Avoid hard-coded UTC offsets

Timestamp handling and common issues in programming languages

Standards and specifications

ISO 8601

ISO date and time representation standard

RFC 3339

Internet date and time format standard

IANA time zone database

Authoritative data source for global time zones

UnixTime standards

UnixSystem time calculation methods and standards

Online time tool

Timestamp converter

Time zone lookup tool

Programming libraries and frameworks

  • Moment.js - JavaScriptTime handling library
  • Day.js - Lightweight time library
  • Arrow - PythonTime handling library

FAQ and solutions

❓ What is the Y2K38 problem?

Y2K38issueis a time overflow issue that occurs on 32-bit systems at 2038-01-19 03:14:07 UTC. At that moment, Unix time exceeds the maximum signed 32-bit integer and can wrap back to 1970. The fix is to use 64-bit systems or 64-bit timestamps.

❓ Why use UTC time?

UTC(Coordinated Universal Time)is the global time standard. It is not affected by location or daylight saving time. In distributed systems and global applications, storing time in UTC avoids time zone confusion and keeps time data consistent. Servers should store UTC and clients should render local time.

❓ How should leap seconds be handled?

Leap secondsare extra seconds added to compensate for changes in earth rotation. Unix timestamps usually do not count leap seconds, so UTC and Unix time can differ by several seconds. High-precision systems should use specialized time libraries.

❓ How should timestamp precision be chosen?

Choose timestamp precision based on the use case.:
Second precision(10digits):Good for logging and user behavior tracking
Millisecond precision(13digits):good for web apps and APIs
Microsecond precision(16digits):good for high-frequency trading and performance monitoring
Nanosecond precision(19digits):Good for scientific computing and real-time systems