Timestamp Converter
Unixタイムスタンプと人間が読める日時を相互変換します。秒・ミリ秒対応。
Unixタイムスタンプ → 日時
日時 → Unixタイムスタンプ
How to Use the Timestamp Converter
This free online timestamp converter lets you convert between Unix timestamps and human-readable dates instantly. Enter a Unix timestamp (in seconds or milliseconds) and click Convert to see the corresponding date in both UTC and your local timezone. You can also enter a date string to get the Unix timestamp. The "Current Time" button shows the current moment in all formats. All processing is done in your browser, so nothing is transmitted to any server.
What is a Unix Timestamp?
A Unix timestamp (also known as Epoch time or POSIX time) is the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC, known as the Unix Epoch. This system provides a simple, timezone-independent way to represent a specific moment in time as a single integer. Unix timestamps are used extensively in databases, APIs, log files, server configurations, and programming languages across all platforms.
Seconds vs Milliseconds
Traditional Unix timestamps are measured in seconds, producing a 10-digit number for current dates (e.g., 1711929600). However, many programming languages and APIs use millisecond precision, producing a 13-digit number (e.g., 1711929600000). JavaScript, for example, uses milliseconds natively in Date.now() and the Date constructor. This tool automatically detects whether your input is in seconds or milliseconds and converts accordingly, showing both values in the output.
Supported Date Formats
When converting from date to Unix timestamp, you can enter dates in various formats including ISO 8601 (2026-04-01T12:00:00Z), common date format (2026-04-01 12:00:00), and most formats recognized by the JavaScript Date parser. For best results, use ISO 8601 format or include the timezone offset. If no timezone is specified, the date is interpreted in your local timezone. The output always shows both UTC and local time for clarity.
タイムスタンプ変換ツールの使い方
Unixタイムスタンプ(秒またはミリ秒)を入力して「変換」を押すと、UTCとローカル時刻の両方で日時が表示されます。 逆に日時文字列からUnixタイムスタンプへの変換も可能です。「現在時刻」ボタンで今の時刻を全形式で確認でき、 全ての処理はブラウザ内で完結するため、データが外部に送信されることはありません。
よくあるエラーと対処 / Common Errors and Fixes
| エラー / Error | 原因 / Cause | 対処 / Fix |
|---|---|---|
| 日付が1970年や55万年になる Date shows 1970 or year 55,000 | 秒とミリ秒の取り違え。10桁=秒、13桁=ミリ秒 Seconds vs milliseconds mix-up: 10 digits = s, 13 digits = ms | 桁数を確認。JSのDate()はミリ秒、PHPのtime()は秒 Count digits; JS Date uses ms, PHP time() uses s |
| 9時間ずれる Times are off by 9 hours | JST(UTC+9)とUTCの混同。DBはUTC保存・表示はJSTが一般的 JST (UTC+9) vs UTC confusion | 保存はUTC統一、表示時にタイムゾーン変換する設計に Store in UTC; convert only for display |
| 同じ日時文字列で結果が環境により違う Same date string parses differently | タイムゾーン指定なしの文字列はローカルTZで解釈される Strings without offsets are parsed in the local timezone | ISO 8601でオフセット付き(2026-04-01T12:00:00+09:00)で受け渡す Always include the offset (ISO 8601) |
| 2038年問題 Year 2038 problem | 32bit符号付き整数の上限(2038-01-19 03:14:07 UTC)を超えると桁あふれ 32-bit signed timestamps overflow in January 2038 | 64bit整数で保持。古いシステム・組み込みの残存に注意 Use 64-bit integers; audit legacy systems |
| うるう秒・夏時間で計算が狂う DST / leap second arithmetic bugs | 「1日=86400秒」の前提が夏時間切替日に崩れる地域がある A day is not always 86,400 seconds across DST changes | 日付演算はタイムゾーン対応ライブラリ(Temporal等)に任せる Use TZ-aware libraries (e.g. Temporal) for date math |
言語別コード例 / Code Examples
JavaScript
Date.now() // 現在(ミリ秒)
Math.floor(Date.now() / 1000) // 現在(秒)
new Date(1711929600 * 1000) // 秒→Date(×1000を忘れない)
new Date().toISOString() // ISO 8601 (UTC)Python
import time, datetime
time.time() # 秒(float)
datetime.datetime.fromtimestamp(1711929600, tz=datetime.timezone.utc)
datetime.datetime.now(datetime.timezone.utc).isoformat()SQL
-- PostgreSQL
SELECT to_timestamp(1711929600);
SELECT extract(epoch from now());
-- MySQL
SELECT FROM_UNIXTIME(1711929600), UNIX_TIMESTAMP();Shell
date +%s # 現在のUnix秒
date -d @1711929600 # 秒→日時(GNU date)変換例 / Before & After
1711929600 (10桁=秒)
→ 2024-04-01 00:00:00 UTC / 2024-04-01 09:00:00 JST
1711929600000 (13桁=ミリ秒、JSのDate.now()形式)
→ 同じ日時。桁数だけが違う
0 → 1970-01-01 00:00:00 UTC(Unixエポック)
2147483647 → 2038-01-19 03:14:07 UTC(32bit上限)Why browser-only?
Timestamps you paste here often come from production logs, audit trails, or incident timelines — data that can reveal user activity patterns. This converter runs entirely in your browser with the built-in Date API: nothing is uploaded, nothing is logged, and it works offline. The seconds/milliseconds detection and UTC/local rendering all happen on your machine — verify with the DevTools Network tab.
ログやインシデント調査のタイムスタンプはユーザー行動を示す機微なデータです。 本ツールは変換の全てがブラウザ内で完結し、外部送信は一切ありません。 秒・ミリ秒・タイムゾーンの落とし穴はUNIX timestamp 変換と落とし穴で詳しく解説しています。
関連ガイド / Related Guides
関連ツール / Related Tools
開発をもっと効率的に
PR
レンタルサーバー
エックスサーバー
国内シェアNo.1の高速レンタルサーバー(エックスサーバー社調べ)。WordPressも簡単セットアップ。
詳しく見る →レンタルサーバー
ConoHa WING
国内最速クラスのレンタルサーバー。独自ドメイン永久無料特典付き(特典内容は変更される場合があります)。
詳しく見る →レンタルサーバー
mixhost
高速SSD・HTTP/3対応のクラウド型レンタルサーバー。
詳しく見る →VPS
シンVPS
メモリ単価国内最安・オールNVMe SSD搭載の高性能VPS。開発・検証環境の構築に。
詳しく見る →Windows VPS
ConoHa for Windows Server
Windows環境のVPS。リモートデスクトップで開発・検証環境を構築。
詳しく見る →