./prontouso.com
CÔNG CỤ LẬP TRÌNH

Chuyển Đổi Dấu Thời Gian (Unix Timestamp)

Chuyển đổi dấu thời gian Unix (tính bằng giây hoặc mili-giây) sang định dạng ngày giờ con người đọc được (ISO 8601, UTC, giờ địa phương) và ngược lại.

Trạng thái công cụChạy trên trình duyệt của bạn
Xem trước

Timestamp to date

Unix seconds
1785157200
Unix milliseconds
1785157200000
ISO 8601
2026-07-27T13:00:00.000Z
UTC
Mon, 27 Jul 2026 13:00:00 GMT
Local time

The unit is guessed from the number of digits; change it if needed.

Date to timestamp


Current timestamp

Unix seconds
Unix milliseconds

Cách thức hoạt động

  1. Nhập dữ liệu của bạn

    Điền các giá trị cần thiết, dán văn bản hoặc tải lên tệp bạn muốn xử lý.

  2. Xem kết quả tức thì

    Hầu hết các công cụ cập nhật theo thời gian thực khi bạn nhập liệu; một số công cụ sử dụng một nút hành động duy nhất.

  3. Sử dụng kết quả

    Sao chép, tải xuống hoặc chia sẻ kết quả được tạo — bạn luôn có toàn quyền kiểm soát dữ liệu của mình.

Quyền riêng tư & xử lý dữ liệuChạy cục bộ 100% trên trình duyệt của bạn. Công cụ này không tải dữ liệu của bạn lên máy chủ.

Chuyển Đổi Dấu Thời Gian (Unix Timestamp) là gì?

Convert a Unix timestamp in seconds or milliseconds into ISO 8601, UTC, and local time, or convert a date back into a timestamp.

TÌM HIỂU CÁCH HOẠT ĐỘNG CỦA CÔNG CỤ

How to convert Unix timestamps

What a Unix timestamp is

A Unix timestamp counts the seconds (or milliseconds) that have passed since January 1, 1970, 00:00:00 UTC. It's the format most APIs, logs, and databases use to store a point in time without depending on any particular timezone or calendar format.

Seconds or milliseconds?

Today's timestamps in seconds have 10 digits, and the same moment in milliseconds has 13. This tool guesses the unit from how many digits you paste, and switches the toggle automatically; change it yourself if a value is ambiguous.

How to use it

  • Paste a timestamp on the left to see it as ISO 8601, UTC, and your local time, or choose "Use current time" to fill in now.
  • Pick a date and time on the right to convert it back into Unix seconds and milliseconds.
  • The current timestamp panel updates every second, for a quick reference or to copy right now's value.

Timestamp example

Seconds to milliseconds
milliseconds = unixSeconds * 1000
Milliseconds to Unix seconds
unixSeconds = floor(milliseconds / 1000)

1704067200 seconds

This converts to 1704067200000 milliseconds and represents 2024-01-01T00:00:00.000Z. The local display depends on the browser timezone.

1704067200 * 1000 = 1704067200000

Timezone notes

A Unix timestamp represents one instant in UTC. The local-time display depends on your device timezone and locale settings.

Các Câu Hỏi Thường Gặp (FAQ)

Why does my timestamp show the wrong date?

This usually means the unit is set incorrectly: a value meant to be milliseconds, read as seconds, lands about 1,000 times further in the future than intended, or the reverse. Toggle the unit and check again.

What does the "Local time" field show?

It shows the date and time in your device's own timezone and locale format, computed from the same underlying timestamp as the UTC and ISO 8601 fields.

Can I convert a negative timestamp?

Yes. A negative value represents a date before January 1, 1970, and is handled the same way as a positive one.

How does daylight saving time affect results?

The timestamp itself does not change, but the local-time display follows your device's timezone rules. Around daylight saving transitions, local times can skip forward or repeat.

Công Cụ Liên Quan