タイムスタンプ変換
Unixタイムスタンプを人間が読める日付に変換。逆変換も対応。
Seconds or milliseconds — auto-detected
Unix タイムスタンプとは?
秒 vs ミリ秒
一般的な使用例
Unix タイムスタンプは 1970 年 1 月 1 日 00:00:00 UTC(Unix エポックとも呼ばれる)からの秒数を数えます。タイムゾーンに依存せず、整数として保存が簡単で、比較やソートが容易なため、コンピューティングで最も広く使われる時刻表現です。
システムによって精度が異なります。ほとんどの POSIX/Unix API は秒を使用します。JavaScript、Java、多くの現代 API はミリ秒を使用します。PostgreSQL と MySQL は秒単位で(オプションの端数付きで)保存します。Redis はミリ秒を使用します。このツールは値が 10¹²(2001 年のミリ秒タイムスタンプの概算値)を超えるかどうかを確認することで自動検出します。
JavaScript では Date.now() がミリ秒を返します — 秒を得るには 1,000 で割ってください。Python では time.time() が秒を浮動小数点数で返します。PostgreSQL では EXTRACT(EPOCH FROM NOW()) が秒を返します。Redis では TIME が秒とマイクロ秒を 2 つの整数で返します。Go では time.Now().Unix() が秒を返し、time.Now().UnixMilli() がミリ秒を返します。このツールは値が 10 桁(秒)か 13 桁(ミリ秒)に見えるかどうかを確認することで精度を自動検出します — 生の値を貼り付けると曖昧さを解消します。
32 ビット符号付き Unix タイムスタンプは 2,147,483,647 — 2038 年 1 月 19 日 03:14:07 UTC でオーバーフローします。タイムスタンプに 32 ビット整数を使用するレガシーシステム(一部の組み込みシステム、古い C コード、MySQL 8.0.28 以前の TIMESTAMP 型)は、負の値にラップするか、エラーをスローする可能性があります。現代の 64 ビットシステムは将来約 2,920 億年まで範囲を拡張します。PostgreSQL の TIMESTAMP 型は 64 ビットを使用し安全です。2010 年以降に構築されたほとんどの Web アプリケーションは 64 ビット整数を使用しており影響を受けませんが、現在も稼働中のレガシーシステムは 2038 年より前に監査・アップグレードすべきです。
ISO 8601(2026-05-13T10:30:00Z)は REST API、データベース、HTML datetime 入力、JSON などのデータ交換フォーマットで使用される現代的な標準です。辞書順でソート可能でロケール間で曖昧さがありません。RFC 2822(Tue, 13 May 2026 10:30:00 +0000)はより古く、電子メールプロトコル時代のもので、JavaScript の Date.toUTCString() が歴史的に生成してきた形式です。すべての新しいシステムでは ISO 8601 を優先してください — Date.parse()、Python の datetime.fromisoformat()、そして実質的にすべての日付ライブラリで受け入れられます。RFC 2822 は、それを必要とするレガシーメールシステムや古い API と統合する場合のみ使用してください。
- タイムスタンプフィールドを持つ API レスポンスのデバッグ
- JWT の有効期限(exp クレーム)の確認
- データベースのタイムスタンプの読み取り
- ログファイルのタイムスタンプの確認
- キャッシュやクッキーの有効期限の設定
よくある質問
- What is a Unix timestamp?
- A Unix timestamp is the number of seconds that have elapsed since the Unix Epoch — midnight UTC on January 1, 1970. It's a universal, timezone-independent way to represent a specific moment in time. It increases by 1 every second and is used in virtually every programming language and database.
- Seconds vs milliseconds — which does my system use?
- Most Unix systems and databases store timestamps in seconds (10 digits as of 2025: e.g. 1700000000). JavaScript's Date.now() returns milliseconds (13 digits: e.g. 1700000000000). This tool auto-detects: if the value is greater than 10^12, it assumes milliseconds.
- What is the maximum Unix timestamp?
- The Unix timestamp overflows a signed 32-bit integer at 2,147,483,647 — which corresponds to January 19, 2038 (the Y2K38 problem). Modern systems use 64-bit integers which extend the range billions of years into the future.
- What is ISO 8601?
- ISO 8601 is the international standard for date and time representation: YYYY-MM-DDTHH:mm:ss.sssZ. The Z indicates UTC. Example: 2024-11-14T22:13:20.000Z. It's unambiguous, sortable alphabetically, and universally understood by APIs and databases.
関連ツール
- JSON Formatter, Validator & Repair Tool
Format, minify, validate, and repair JSON instantly in your browser. Sort keys alphabetically, auto-format on paste, download as file, escape/unescape strings — free, no sign-up, 100% client-side.
- QRコード生成
URL、テキスト、Wi-FiなどのQRコードを生成。PNGでダウンロード可能。
- パスワード生成
カスタム長と文字セットで強力なランダムパスワードを生成。
- Base64 エンコーダー / デコーダー
テキストをBase64にエンコード、または逆にデコード。
- URLエンコーダー / デコーダー
パーセントエンコーディングでURLとクエリ文字列をエンコードまたはデコード。